Created
July 2, 2015 20:15
-
-
Save Nama/ddbb0a83d167e52d0d41 to your computer and use it in GitHub Desktop.
Small script for Logitech keyboards with different backlight colors. Changes the color of the backlight permanently, smooth! Shouldnt be hard to make it use on keyboards with just two colors.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function OnEvent(event, arg) | |
if (event == "PROFILE_ACTIVATED") then | |
color() | |
end | |
end | |
function color() | |
r1 = 0 | |
g1 = 0 | |
b1 = 0 | |
while true do | |
r2 = math.random(255) | |
g2 = math.random(255) | |
b2 = math.random(255) | |
for loop = 0, 255, 5 do | |
SetBacklightColor((r2*loop+r1*(255-loop))/255, (g2*loop+g1*(255-loop))/255, (b2*loop+b1*(255-loop))/255, "kb"); | |
Sleep(50); | |
end | |
r1 = r2 | |
g1 = g2 | |
b1 = b2 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment