English French German Spanish Russian
What color is that? @{RGBA} color tags - TECHNICAL SUPPORT / WEB APPs BUGS - Ryzom Community ForumHomeGuest

TECHNICAL SUPPORT / WEB APPs BUGS


uiWebPrevious1uiWebNext

#1 Report | Quote[en] 

We can write on crafted items using @{RGBA} tags but I have yet to find a reliable way to convert from any other color scheme to Ryzom's @{RGBA}. Standard RGBa converters don't work as their output is CSS3 compliant in rgba(0, 0, 0, 0.5) format.

Anyone able to give some insight or help on this?

---

No guild. No fame.
Gorran is my name.

#2 Report | Quote[en] 

Not specific to ryzom, but it sounds like RGBA should be noted as 4 hex numbers,
so RGBa(0, 0, 0, 0.5) should corespond to 00000080

where all four values are 0-255 (h00-hFF), 0.5 being 128 = h80.

#3 Report | Quote[en] 

Pokeraitis
Not specific to ryzom, but it sounds like RGBA should be noted as 4 hex numbers,
so RGBa(0, 0, 0, 0.5) should corespond to 00000080

where all four values are 0-255 (h00-hFF), 0.5 being 128 = h80.

No, it's not quite like that from what I've experienced so far. Each slot takes only a single hex number 0-f. Having written that, I have an idea for getting close. OK...this seems to work relatively well:

Pick a color using typical RGB format such as rgb(0,245,184). Divide each value by 16, rounded to the nearest integer. Convert that integer to a Hex value and use that value for Ryzom's color tag. RGB(0,245,184) becomes @{0fbf}. Not perfect but fairly close.

---

No guild. No fame.
Gorran is my name.

#4 Report | Quote[en] 

it should be noted then as rgba (instead of RGBA), but that makes sence.

#5 Report | Quote[en] 

its the usual short version for hex colors...

code -> short (long to dec)
00 -> 0 (0)
11 -> 1 (17)
22 -> 2 (34)
33 -> 3 (51)
44 -> 4 (68)
55 -> 5 (85)
66 -> 6 (102)
77 -> 7 (119)
88 -> 8 (136)
99 -> 9 (153)
aa -> a (170)
bb -> b (187)
cc -> c (204)
dd -> d (221)
ee -> e (238)
ff -> f (255)

your RGB(0,245,184) would be the same as #00F5B8
your calculation should make it 0, 15.3125 (15), 11.5 (12) -> #0FC
I'd say #0EB (look at the table above to see why) making it @{ 0ebf }

Try it and see if the color matches better ;-)


Edit: lol, was getting an error "::Entity [0ebf] has not been defined in the configuration"

Edited 4 times | Last edited by Jarnys (8 years ago)

---

uiWebPrevious1uiWebNext
 
Last visit Fri Jul 3 23:40:08 2020 UTC
P_:

powered by ryzom-api