html - CSS equivalent for Text Tint -


i'm trying export files adobe indesign basic html + css.

a user can select text , change text colour. using indesign sdk can fetch rgb values colour , in css file declare color: rgb(r,g,b) works fine.

you can change text tint value. upto taking tint value, converting range 0-1 , in css putting entry color: rgba(r,g,b,tint)

during testing realized tint = 0 should mean white text, didn't show on html because (in rgba) = 0 means transparent!!!

anyone knows how handle tint values in css?

there no tint, hue,saturation or brightness in css. should "build" these properties rgb color. apply tint on rgb, use expression:

when r,g,b 0..255, tint 0..1

new r = tint*r + (1-tint)*255; new g = tint*g + (1-tint)*255; new b = tint*b + (1-tint)*255; 

tint convex combination of color , white color. see wikipedia.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -