View Full Version : conversion of color
Stephano
22nd May 2006, 12:15
:cool:
When i save my projet;
the var : QColor colorwidget is white
So ,in filesave *.cpp ,the value is 0xbffcc8fc.
i dont understand the codage of color.......
white normaly will have the value :255 255 255====>what s the result of this value after coding
Thanks:o
munna
22nd May 2006, 12:28
These are the hexadecimal values of rgba(red,green,blue and alpha-channel i.e., transparency).
In your case it should ideally be 0xffffffff
wysota
22nd May 2006, 12:30
:cool:
white normaly will have the value :255 255 255====>what s the result of this value after coding
0xFFFFFF
Maybe your coding your white somehow incorrectly or it's not white at all (or it's using some different colourspace than (A)RGB).
Stephano
22nd May 2006, 12:39
thanks
But,in this expression :
0xbffcc8fc,
bf --->R
fc---->G
c8----->B
fc----->alpha chanel
????that s true or false
if it s true, can i convert 0x** ** ** **to 0x****.
thanks to all
munna
22nd May 2006, 12:45
But,in this expression :
0xbffcc8fc,
bf --->R
fc---->G
c8----->B
fc----->alpha chanel
????that s true or false
Its true.
can i convert 0x** ** ** **to 0x****.
You can use QColor red(), QColor green(), QColor blue() to get the integer values and play around. Alpha channel by default is 255(ff).
wysota
22nd May 2006, 12:56
How did you receive that value anyway?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.