SOLVED? Wrong background colors with alpha?

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
User avatar
pjj
Posts: 1914
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

SOLVED? Wrong background colors with alpha?

Post by pjj »

I believe background colors (in e.g. CSS highlighter) are off, if using alpha transparency:
alpha-colors.png
alpha-colors.png (21.71 KiB) Viewed 2305 times
#efefef55 in the editor is much darker *) than displayed in the Select Color window. #fff9 is too dark, too.

*) checked it with a color picker, so it's not optical illusion ;)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 6160
Joined: 19 Jul 2006 14:29

Re: Wrong background colors with alpha?

Post by Rickard Johansson »

A color with alpha transparency will always look different depending on the background. A lighter background gives a lighter color, a darker background - a darker color ...
What really matters is how it looks in your HTML document displayed by the browser. And unfortunately, I don't think there is any other way to test the color than displaying it in a browser preview tab.

User avatar
pjj
Posts: 1914
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: SOLVED? Wrong background colors with alpha?

Post by pjj »

You are, of course, right -- and yet there is a, well, discrepancy in how alpha colors are calculated and displayed:
alpha-transparency.png
alpha-transparency.png (15.22 KiB) Viewed 1910 times
There are four places in which background color of hexcodes is displayed: (1) CSS highlighter, (2) HTML highlighter, (3) floating color box and (4) Select Color window. My screenshot shows first three; (1) and (3) are the same, (2) is different. In (4) Select Color window this color is presented as (2). So, seems like you use two algorithms of calculating non-alpha color from alpha color. Which one is correct (because two, giving different results, can't be correct simultaneously)? Well, the former (i.e. 1 & 3).

I made a simple web page to check it out. In RJ TE the color in question (#efefef55) is shown as #72726f (1 & 3); in Firefox it is #727270 and in Opera #737370. So, I guess it needs some attention anyway 8)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
pjj
Posts: 1914
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: SOLVED? Wrong background colors with alpha?

Post by pjj »

The way you have solved the problem is very creative; chapeau bas! :) (Perhaps outlines could be bit thicker, though?)

Now, there's another glitch: Select Color window's background is suddenly the same as editor tab's, which isn't helpful:
select color.png
select color.png (46.72 KiB) Viewed 1869 times
(Btw, I wonder what's going on with my screenshots: they look OK on my machine, but are distorted here on the forum in both Firefox and Opera; what's even more interesting, when I open these images in new browser's tab, Firefox keeps distorting them, but not Opera.)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
pjj
Posts: 1914
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: SOLVED? Wrong background colors with alpha?

Post by pjj »

Image
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 6160
Joined: 19 Jul 2006 14:29

Re: SOLVED? Wrong background colors with alpha?

Post by Rickard Johansson »

Only seems to be an issue with certain themes. It's fixed in the next version (v14.73). Thanks!

Post Reply