The International Simutrans Forum

 

Author Topic: Transparent Colours  (Read 632 times)

0 Members and 1 Guest are viewing this topic.

Offline OrangeSkin325

  • *
  • Posts: 20
  • I love Hong Kong very much! 我真係好撚中意香港!
  • Languages: ZH EN
Transparent Colours
« on: September 23, 2020, 01:25:05 PM »
Sorry guys! I would like to ask is there a list of transparent colors? Thanks!

Offline Freahk

  • Devotee
  • *
  • Posts: 1303
  • Languages: DE, EN
Re: Transparent Colours
« Reply #1 on: September 23, 2020, 02:09:49 PM »
What do you mean by a list of transparent colors?
You can use alpha channel transparency with any color.

Offline OrangeSkin325

  • *
  • Posts: 20
  • I love Hong Kong very much! 我真係好撚中意香港!
  • Languages: ZH EN
Re: Transparent Colours
« Reply #2 on: September 23, 2020, 05:30:26 PM »
arghh actually I am going to draw an addon with a glass wall that can transparent the roadway, which I can see the vehicles going through the glass. I just want to know the colour code of it :P Btw, what is alpha channel transparency?

Offline Václav

  • Devotee
  • *
  • Posts: 3319
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Transparent Colours
« Reply #3 on: September 23, 2020, 06:56:33 PM »
No, there is no list of transparent colours. As you may use alpha transparency, beware of player colours. There is a bug that causes very strange effects. However, you still may use basic night lighting colours (there are four ones usable for windows - and some other for signals).

But unfortunately, I don't remember their decimal RGB codes - excepting one: 87,101,111 that is for lighter dark windows.

Offline Vladki

  • Devotee
  • *
  • Posts: 3437
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Transparent Colours
« Reply #4 on: September 24, 2020, 08:39:07 AM »
Special colors are here:  https://simutrans-germany.com/wiki/wiki/en_SpecialColors?page_ref_id=493

There is one - absolutely transparent: 0xE7FFFF, so that is not very useful for windows. You either have to use alpha channel to get semitransparent colors (and for that some of the day/night colors might be nice), or use absolute transparent and some not transparent color in a chessboard style..

Btw, what is alpha channel transparency?
https://bfy.tw/PACN    ;)

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1468
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Transparent Colours
« Reply #5 on: September 24, 2020, 11:07:38 AM »
https://bfy.tw/PACN    ;)
Come on. The results you get there stray to Cinema 4D to CSS with - for this context here - useless or unappliccable information. Plus, you seem to have no problem answering where to find simutrans special colors, despite googling "simutrans special colors" already leading to the very same link you provided.


Alpha Channel is a channel just like the color channels (RGB), but instead of providing the intensity of the color components, it provides the opacity. You can think of it as a mask over the image - wherever the mask is "black", you see the image, where it's "white", you don't see the image but what's behind it, and with gray, you see both - background and image blend.

How to work with alpha channels depends on the program you use. Some simple programs don't support it at all (eg. MS Paint)
For some you need to activate it (eg. gimp), but then can just use an eraser on parts of the image you want to be transparent (eraser opacitiy lowered for semi-transparency). Make sure that you save the image in a format that allows for semi-transparency, that would be PNG32 (Not PNG8)
If your tool supports it, use masks. Masks provide you with a seperate 'layer' for the alpha channel. Instead of erasing parts of your wall, you'd paint that part gray in the mask. Makes it easier to adjust things down the road.

Offline Flemmbrav

  • Devotee
  • *
  • Posts: 212
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Transparent Colours
« Reply #6 on: September 24, 2020, 04:07:37 PM »
The actual alpha channel: https://bit.ly/304W7zw

Offline OrangeSkin325

  • *
  • Posts: 20
  • I love Hong Kong very much! 我真係好撚中意香港!
  • Languages: ZH EN
Re: Transparent Colours
« Reply #7 on: September 24, 2020, 08:52:12 PM »
Thanks:)
The actual alpha channel: https://bit.ly/304W7zw
I hate Jungle btw :)