Установить Steam
войти
|
язык
简体中文 (упрощенный китайский)
繁體中文 (традиционный китайский)
日本語 (японский)
한국어 (корейский)
ไทย (тайский)
Български (болгарский)
Čeština (чешский)
Dansk (датский)
Deutsch (немецкий)
English (английский)
Español - España (испанский)
Español - Latinoamérica (латиноам. испанский)
Ελληνικά (греческий)
Français (французский)
Italiano (итальянский)
Bahasa Indonesia (индонезийский)
Magyar (венгерский)
Nederlands (нидерландский)
Norsk (норвежский)
Polski (польский)
Português (португальский)
Português-Brasil (бразильский португальский)
Română (румынский)
Suomi (финский)
Svenska (шведский)
Türkçe (турецкий)
Tiếng Việt (вьетнамский)
Українська (украинский)
Сообщить о проблеме с переводом
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.