mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 06:28:01 +01:00
@@ -34,7 +34,7 @@
|
||||
var/blue = mixOneColor(weight,bluecolor)
|
||||
|
||||
//assemble all the pieces
|
||||
var/finalcolor = "#[red][green][blue]"
|
||||
var/finalcolor = rgb(red, green, blue)
|
||||
return finalcolor
|
||||
|
||||
/proc/mixOneColor(var/list/weight, var/list/color)
|
||||
@@ -58,10 +58,9 @@
|
||||
mixedcolor = round(mixedcolor)
|
||||
|
||||
//until someone writes a formal proof for this algorithm, let's keep this in
|
||||
if(mixedcolor<0x00 || mixedcolor>0xFF)
|
||||
return 0
|
||||
// if(mixedcolor<0x00 || mixedcolor>0xFF)
|
||||
// return 0
|
||||
//that's not the kind of operation we are running here, nerd
|
||||
mixedcolor=min(max(mixedcolor,0),255)
|
||||
|
||||
var/finalcolor = num2hex(mixedcolor)
|
||||
while(length(finalcolor)<2)
|
||||
finalcolor = text("0[]",finalcolor) //Takes care of leading zeroes
|
||||
return finalcolor
|
||||
return mixedcolor
|
||||
|
||||
Reference in New Issue
Block a user