As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [color]

Color is the visual perception of light by humans into named categories, commonly "red," "green," and "blue."

Filter by
Sorted by
Tagged with
2 votes
1 answer
81 views

Triangular Metric

Given a point inside a unit equilateral triangle, how does one rotate it across the triangle perimeter? I.e. the triangle outline serving the same purpose as circle's circumference. That is actually a ...
SmugLispWeenie's user avatar
0 votes
1 answer
466 views

Color of Image changes to white between 2 positions using Color.Lerp - Unity

Hi I have an empty object barHolder that I move between 10 and 98 on x-axis. It has 2 child ...
thirteen4054's user avatar
1 vote
1 answer
2k views

Unity Vertex Color Shader with Transparency

I'm trying to achieve a simple effect: I have a cube mesh and I want some of the vertices to change color. In this case, I want it to form some sort of a gradient where the unchanged vertices are set ...
Daniel Marques's user avatar
0 votes
1 answer
59 views

Easy way to generate colour-per-vertex models for input to Blender

I procedurally generate 3D planet models that I would like to import into Blender. I use colour per vertex rendering in my shaders (In practice, I use the same colour for all vertices of a face, but ...
Bram's user avatar
  • 3,699
0 votes
2 answers
3k views

Problem with Material Parameter Collection Reference Variable in Set Scalar Parameter funcion

I was following a tutorial on using GameInstance. Where the guy in the video would teach how to choose the color of the ship by clicking a button on a level (x), so as to affect the ship on another ...
Boneco Sinforoso's user avatar
2 votes
1 answer
3k views

Programmatically generated mesh vertex colors not showing up in Unity?

I'm sorry if this is an obvious thing to solve but I just can't figure it out...did I miss something...I've generated a mesh and during vertices generation I've also set its colors (and colors32 just ...
GI1's user avatar
  • 33
4 votes
1 answer
4k views

What makes a shader function with a LineRenderer?

A LineRenderer has both Material and Color properties. But many shaders do not work, ie the line will not respect the Color property, or the line will show black (regardless of the materials having ...
Jethro's user avatar
  • 309
2 votes
1 answer
391 views

How can I create color fonts to be used in Unity?

I've been searching, downloaded a couple programs that lets you convert images into fonts, but none let you obtain the color. They all switch them to black and white. While searching the internet, I ...
L2L2L's user avatar
  • 21
0 votes
1 answer
211 views

Running OpenGL app on Windows XP x86 produces incorrect texture colors

I'm working with the Cen64 emulator and I compiled from source a x86 version that operates fine on Windows 10 x64. As soon as I run it on a Windows XP x86 machine the colors are then all incorrect. ...
CalebHC's user avatar
  • 371
0 votes
1 answer
2k views

How can I use the colours of a swatch in a script?

In Unity's editor I have set a swatch with some colours that are used throughout our game: This swatch is saved in a file in the project's Assets folder: ...
Bassie-c's user avatar
  • 125
1 vote
1 answer
443 views

Why only few parts of the 2D sprite change their colour when I apply sprite color in Unity?

I'm making a stickman 2D game where I have different sprites for the player. But when I try to change the Sprite Renderer Color, it only changes few pixels of the sprite and the rest stays black as ...
ddd555's user avatar
  • 13
1 vote
0 answers
48 views

How to apply a visual filter to what I am drawing?

I'm looking to apply a sepia filter to what I'm rendering. Perhaps we could just apply the filter to the view or pass it to the draw method to draw everything with the filter (I'm using one draw ...
Featherball's user avatar
3 votes
1 answer
157 views

How to paint regions of a map with visually different colors

I'm learning some concepts of procedural content generation. Now I'm generating a map with regions and each region has a diferent colors generated in a pseudo-random way. My problem right now is ...
Killrazor's user avatar
  • 395
1 vote
1 answer
135 views

OpenGL additive vertex color mode

Surely OpenGL has a way to set the vertex color mode. By default it is multiplication. When I have an existing texture on a quad to represent a player in my game, I want to add color to it. As of ...
Dan's user avatar
  • 276
2 votes
2 answers
6k views

How can I efficiently change the color of a BufferedImage?

I am trying to change the color of a white BufferedImage image. I do know that you can use .setRGB(x,y,rgb) and simply run some ...
Sublime Noob's user avatar
2 votes
1 answer
707 views

Unity : Changing color of 2D sprite distorts sprite shape [closed]

In my 2D game, my circle shape for example, appears round, but when I change the color then it turns into a low poly circle with 8-16 points, more like a potato. Is there any way around this? ...
John Ashmore's user avatar
1 vote
0 answers
841 views

Shadow & sorting issues with vertex colored PBR Shader Graph

I'm working on a custom shader using Unity 2018's new shader graph feature. Previously, I was using this shader, which worked great for awhile, but it ended up constantly breaking for seemingly no ...
Anthony's user avatar
  • 11
5 votes
1 answer
9k views

draw a box with transparent background (outline) in unity

I am trying to draw an outline (a transparent box with colored border essentially) I have the following code adapted from here ...
Pavan K's user avatar
  • 163
0 votes
2 answers
444 views

What exactly is the "blend factor" t in Color.Lerp?

I had a bit of a look around and couldn't see anywhere this was addressed, my apologies if it has been. In Color.Lerp, I understand that the 3rd parameter t is not in fact the time that it takes to ...
ThatCob's user avatar
3 votes
0 answers
386 views

Weird libGDX BitmapFont Color Change (And Alpha) Bug

I want to change the color of my libGDX BitmapFont, but it can't change it. The font is generated with Hiero v5 (Lastest as I Know) but the color of the font doesn't change. Here is the example code, ...
user2963359's user avatar
0 votes
1 answer
893 views

Changing the color data of an instance of a shared texture? MonoGame

I want to load multiple instances of a texture on the screen and be able to change the color of each one individually by clicking on it. I've tried many different ways and currently I'm creating two ...
Chaz Carey's user avatar
0 votes
1 answer
58 views

Quality deterioration on a device

I am using Unity. When I try the game out in the IDE everything looks pretty good: But when I am trying to play the same game on a device the quality becomes a great deal worse and you can see it for ...
hellomates's user avatar
4 votes
2 answers
250 views

How do I implement 2d color animation like in this video?

link on youtube at 1:38 - 1:42, purple things (I think this is particle system) that come off from the moon. Someone else had decompiled the game in the past, and the assets shows that the dark blue ...
Rei's user avatar
  • 165
2 votes
1 answer
5k views

Sprite changes colour when imported into Unity

I create some simple geometrical shapes in Inkscape, then export it to PNG and import into Unity. Positive example: I make a rectangle of colour hsva(0, 0, 32, 255), export it as a 32x32 PNG image ...
Ismael's user avatar
  • 51
1 vote
1 answer
167 views

How to achieve this kind of look of a cube in a most efficient way?

It might be a trivial question, but I couldn't come up with a simple solution. I need to create a cube like on the image below in Unity. As always, I target mobile ...
Jacob's user avatar
  • 2,522
1 vote
2 answers
721 views

Why do I get odd color effects in smooth transitions with OpenGL?

I am making a planet generator, and when I go too close to the planet, the smoothly colored surface has striations. Very visible striations, as seen in the attached image. The color transition is ...
Henry Stone's user avatar
0 votes
1 answer
2k views

How can I accurately lerp Colors over seconds?

I have some code to lerp between two colors over a set number of seconds, and the lerp works fine: ...
Evorlor's user avatar
  • 5,397
1 vote
2 answers
3k views

2D racetrack collision bounce using angle of reflection (bounce angle)

I am currently working on a race game where I want to define the collision of my vehicle with the outer and inner borders of the track. If that happens to be the case I want to vehicle to bounce of ...
Ahmed Ali's user avatar
37 votes
4 answers
11k views

Should I use "conventional" colors to represent item rarity?

I'm making a new RPG that has loot. In fact, a majority of the game is based around loot. It's going to have colored borders to denote the rarity of the loot as it's drawn. WoW uses Grey, White, ...
DasBeasto's user avatar
  • 648
1 vote
2 answers
3k views

Flipping Textures in Modern OpenGL

How do I flip a texture in modern OpenGL (3.1+)? This is the unflipped render, keep in mind it is drawn with 8x8 tiles from a texture atlas, so I edited green squares below him into the image to ...
Accumulator's user avatar
0 votes
1 answer
69 views

Game Maker (and others): what data type is colour and how can I compare them?

In Game Maker, and I imagine other engines, one can "make colour" by defining either the red-green-blue values of the colour or its hue-value-saturation. I want to create a program that can compare ...
user289661's user avatar
3 votes
1 answer
6k views

How do I get the object color?

I want to get the object color, when I start the game. How do I do this? ...
user43474's user avatar
  • 537
1 vote
1 answer
466 views

Can ARToolKit be used for color detection?

I'm trying to make an app that will show an object from different sides, but the target will be too small for any real marker detection. Think of a cube with one or two centimeter sides. The camera ...
John Hamilton's user avatar
0 votes
2 answers
220 views

Game Design: Colour units per team or per unit type?

In an RTS game where the units are viewed from the top so that they appear relatively small on the screen: What would be the best game design? Colour the units per team, for example: enemy is always ...
Jasper Citi's user avatar
3 votes
2 answers
237 views

The meaning of colours in other cultures

According to http://www.color-wheel-pro.com/color-meaning.html and many other western websites certain colours have meanings. To summarise the meaning of colours in the context of a typical RTS game: ...
Jasper Citi's user avatar
0 votes
1 answer
173 views

glColor3f() 0.0 = no intensity 5.0 = full intensity?

I have a very weird behavior of openGL's glColor right now. I've wasted hours to detect why my line colors acting so weird until I found out that 0.0 rgb values is zero intensity and 5.0 lead to full ...
Piranha's user avatar
  • 260
1 vote
1 answer
2k views

What is Surface.set_colorkey() in Pygame?

In pygame, what does Surface.set_colorkey() do? Explain it in a very easy way please. Also, what exactly does it do? I heard it makes parts that are the same color ...
TJRelytS's user avatar
2 votes
1 answer
521 views

Color Correction in DirectX

After playing games like Star Wars Battlefront & GTA 5 I was wondering how dev's implement Color Correction in their Engines. I know that this can be done through the use of 3D LUT's but I was ...
Arjan Singh's user avatar
3 votes
1 answer
846 views

Color spaces: Should colors be converted to linear color before applying premultiplied alpha?

For instance, when loading an image that is SRGB, which of these is correct? Simple premultiply: Take SRGB color from file and multiply RGB by alpha or Convert to linear before premultiply: Take ...
Tim R.'s user avatar
  • 268
0 votes
1 answer
189 views

Color mapping of difference

I have two arrays A and B. I want to do color mapping of their difference A - B. So far, I ...
Martin Perry's user avatar
  • 1,106
2 votes
0 answers
775 views

Linear color workflow with render to texture - Banding in alpha channel?

In OpenGL, I am using GL_SRGB8_ALPHA8 for the OpenGL internal texture format for my textures and render targets. This eliminated some banding I was seeing in dark ...
Tim R.'s user avatar
  • 268
2 votes
1 answer
82 views

How to save one color channel, taking only 1 byte per pixel?

How can I save only one color channel, such that it would only take 1 byte per pixel? I only want to save the alpha channel and apply colors later using a custom shader. But all the formats I tried ...
Riko's user avatar
  • 155
1 vote
2 answers
684 views

Phaser BitmapData Pick Color and Paint

Hi guys, Could anyone kindly shows me a little bit of code about pick and paint color to the sprite? here is my code that I have played around, but I still cannot find out and achieve it. Thanks ...
pler_programmer's user avatar
4 votes
2 answers
3k views

What is the benefit of YCbCr?

Why would someone want to store images as YCbCr instead of RGB in RAM or in GPU memory?
user68854's user avatar
  • 197
2 votes
1 answer
72 views

Unity, Solid Color to link Platforms

[UNITY] As you can see above a solid color is connecting one platform to another. My question is whether this color must be applied through code or through a sprite. In my game there are three lanes ...
user78705's user avatar
1 vote
0 answers
75 views

How to color individual parts of curve in unity, real time?

So I have a mesh curve that I've imported from Blender. What I want to do is to place individual points on the curve (at fixed distance) and then based on a specific number, color them. Let's say for ...
user avatar
0 votes
1 answer
588 views

How can I duplicate this color/hue shifting effect in C#?

I am looking for a way to duplicate this color shifting effect: I don't think it matters but the starting frame would be this: My instinct was that some type of hue shift is occurring in a way that ...
test's user avatar
  • 520
4 votes
2 answers
2k views

Gradient Banding in Unity Android

In an Android game, I have a gradient background that changes color over time. This was achieved by creating a 1x2 pixel texture in code, and stretching it over a large quad with bilinear filtering. ...
eclmist's user avatar
  • 1,153
1 vote
1 answer
200 views

Creating colour spectrum by light flux values

I am using radiosity method to compute the inter-reflected light within a room. The room is gridded into small patches and the light flux in lumen is calculated for each. This part is done. Now I want ...
ali's user avatar
  • 167
8 votes
1 answer
2k views

Pixel Picking vs Raycasting

I was recently introduced to a way of picking in OpenGL known as pixel picking (or color picking). From my understanding, how this is done is that the scene is rendered to the back buffer with a ...
DarkDestry's user avatar
  • 1,421