#Help with color in json-ui?

1 messages · Page 1 of 1 (latest)

true oriole
#

Im currently trying to work with the $color stuff but im not quite sure on how it works

"$color": [
            1,
            0.3,
            0.1
                 ],``` could someone explain how the colors work?
#

like im not sure how 1 is fully red etc

#

like what kind of color code is used?

buoyant mason
#

Color property values are divided from RGB values into 1. ( <RGB value> divide 255 ), you should get some values like [ 0.956, 0.505, 0.333 ] ( RGB — 244, 129, 85 )

#

[ 1, 1, 1 ] by default are white. and [ 0, 0, 0 ] are black. and so on.

true oriole
buoyant mason
#

yeah. you should get the number ranged from 0 to 1.

true oriole
#

ahh alr thank you

#

i needed it for a hover of a button but i MIGHT switch to just textures

true oriole
buoyant mason
#

Oh that's nice.

true oriole
buoyant mason
#

if you're using color property on image. make sure it must be white texture based or otherwise it'll apply the existing color, essentially mixing them together like what you wouldn't expected it to.

#

Dark + bright red = dark red, by that logic of course.

true oriole
#

hm

#

so i should make a light button?

buoyant mason
#

well I suppose. you can make them abit darker with color property if you will.

true oriole
buoyant mason
#

you can.

#

like I said, it works like RGB but divided into 1. the texture color will also affected aswell resulting color mix.

#

so, white texture are highly recommended.

true oriole
buoyant mason
#

Depends on your taste of UI. I'm not sure with that.

true oriole
buoyant mason
#

looks alright but the button aren't centered.

true oriole
#

ik its cause of the scroll bar