Recent

Author Topic: Transparent color  (Read 9176 times)

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Transparent color
« on: August 26, 2011, 02:07:33 pm »
I use the old one-color transparency. What is the best color for this ? Everyone has different colors. I use some images from ThemeServices and then I paint them transparently. I can define any transparent color, for example $778899. But if someone uses this color in his/her system then it will cause problems.
I don't want use full transparency (like TBGRABitmap).
And next question: How can I transform constant-color to a real value ?
cl3DShadow is $80000015 and I would like to know its RGB (like above $00778899).

See screenshots.

Thanks for help.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Transparent color
« Reply #1 on: August 26, 2011, 02:21:59 pm »
Try this:

MyColor := ColorToRGB(cl3DShadow)

avra

  • Hero Member
  • *****
  • Posts: 2580
    • Additional info
Re: Transparent color
« Reply #2 on: August 26, 2011, 04:03:51 pm »
But if someone uses this color in his/her system then it will cause problems.
What problems? I have seen some single color (clFuchsia) transparent images that are shown on screen and besides them a combo box with system colors (including clFuchsia).
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Transparent color
« Reply #3 on: August 26, 2011, 06:51:49 pm »
Quote
What problems?
See the screenshot "bad_transparentcolor". It is button painted via ThemeServices (Qt4, Plastik). Transparent color is accidently the same as one of the colors of the button, therefore it makes that ugly line with garbage (it comes from background, and it shouldn't).
« Last Edit: August 26, 2011, 06:53:55 pm by Blaazen »
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: Transparent color
« Reply #4 on: August 29, 2011, 09:47:14 am »
if you can't use png with trancparenty, then use fucsia color for tranparency, it's:
Code: [Select]
HEX #FF00FF
RGB (255, 0, 255)

 

TinyPortal © 2005-2018