Steam installeren
inloggen
|
taal
简体中文 (Chinees, vereenvoudigd)
繁體中文 (Chinees, traditioneel)
日本語 (Japans)
한국어 (Koreaans)
ไทย (Thai)
Български (Bulgaars)
Čeština (Tsjechisch)
Dansk (Deens)
Deutsch (Duits)
English (Engels)
Español-España (Spaans - Spanje)
Español - Latinoamérica (Spaans - Latijns-Amerika)
Ελληνικά (Grieks)
Français (Frans)
Italiano (Italiaans)
Bahasa Indonesia (Indonesisch)
Magyar (Hongaars)
Norsk (Noors)
Polski (Pools)
Português (Portugees - Portugal)
Português - Brasil (Braziliaans-Portugees)
Română (Roemeens)
Русский (Russisch)
Suomi (Fins)
Svenska (Zweeds)
Türkçe (Turks)
Tiếng Việt (Vietnamees)
Українська (Oekraïens)
Een vertaalprobleem melden
function gFix(r,g,b,a) if not a then a = 255 end return r^3.2/255^2.2,g^3.2/255^2.2,b^3.2/255^2.2,a end
_sc = screen.setColor
screen.setColor = function(r,g,b,a) _sc(gFix(r,g,b,a)) end
This way, you can just call screen.setColor(...) and it will correct things for you. If you need to use the old colors for whatever reason, just call _sc(...).
No need to use screen.setColor(GF(r,g,b,a)) anymore with this you just call the function as if your writing screen.setColor but using this instead. ex: SC(200,50,100,100) if you want to have some transparency. You can use regular rgb SC(200,50,100) it will be the same as SC(200,50,100,255).
[code]
function SC(r,g,b,a)
if a==nil then a=255 end
r=r^2.2/255^2.2*r
g=g^2.2/255^2.2*g
b=b^2.2/255^2.2*b
screen.setColor(r,g,b,a)
end
[/code]
Thanks so much! Was really struggling to figure out why the colours in-game seemed so washed out.
Will be implementing this into the VSCode Extension so that it matches the in-game colour-space better.
Thanks again!
Originally I don't intend to correct colors in any environments and I expected that write color codes selected by color picker to a microcontroller.