Wrong rgba color
See original GitHub issuePlease ensure you have given all the following requested information in your report.
Issue details
rgba color is wrong.
Reproduction steps/code
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
FreeTypeFontGenerator.FreeTypeFontParameter parameter2 = new FreeTypeFontGenerator.FreeTypeFontParameter();
parameter2.size = 80;
parameter2.color = new Color(255, 155, 0, 1);
parameter2.borderWidth = 4f;
BitmapFont font2 = generator.generateFont(parameter2);
font2.draw(batch, "TEST!!!", x, y);
Use any color picker to see color, it should be darker yellow. Between orange and yellow. But rendered always Color.YELLOW not rgba.
Version of LibGDX and/or relevant dependencies
Gdx version: 1.9.8
Stacktrace
No stack trace, just wrong color.
Please select the affected platforms
- [+] Windows
Not tested other platforms yet.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Question - RGBA Color Code Sets Wrong Color - Unity Forum
I have a randomly generated number and based on that number the gameobject's color will change. I have this code: switch (randomNumber) {......
Read more >Receive incorrect alpha channel when convert rgba color to hex
In order to convert rgba color with alpha channel to hex I use the code. let rChannel = 255; let gChannel = 255;...
Read more >rgba() - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The rgba() functional notation expresses a color according to its red, green, and blue components. An optional alpha component represents ...
Read more >CSS RGB and RGBA Colors - W3Schools
RGBA color values are an extension of RGB color values with an alpha channel - which specifies the opacity for a color. An...
Read more >scss file -> wrong rgba css output - CSS-Tricks
My Problem is a bug in scout, but there is a workaround for handling rgba correctly: you have to use “rgba(255, 255, 255,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I propose a new constructor that takes the first two arguments at 0-255 and the other two at 0f-1f.
@yuripourre thank you 😃