Questions tagged [hsb]
59 questions
1
vote
1 answer
Java: Cycling through a particular color with HSV
So I've been trying to cycle through colors within a certain degree range using HSV, but I can't seem to transition smoothly between the colors. Ideally I would like to be able to move within a specific degree range (80-140) and cycle the saturation…

Austin Beaulieu
- 13
- 3
1
vote
1 answer
Displaying a color according with HSBcolor.Lerp?
Basically I have a data visualization in Unity which i am using the Lerp function.
Displaycolor =
HSBColor.ToColor((HSBColor.Lerp(HSBColor.FromColor(Maxcolor),HSBColor.FromColor(Mincolor),0.3f)));
I'm using this code to Lerp between my Min and…

xalvin
- 113
- 1
- 13
1
vote
0 answers
Converting HSB to RGB
I'm creating a WindowsForm application that can take my input HSB values and turn them into RGB values. I adapted JDB and Mohsen's answer here: HSL to RGB color conversion
My resulting code is below:
using System;
using…

Chrayfish
- 157
- 2
- 11
1
vote
2 answers
Objective-C RGB to HSB
Let's say I've got the colour FF0000, which is red. Finding a darker colour is easy, I just type maybe CC instead of the FF, but let's say I've got the colour AE83FC, which is a complicated colour, how the heck would I find a lighter or darker…

Johannes Jensen
- 1,228
- 2
- 18
- 28
0
votes
0 answers
How to use setPixel with HSV instead of RGB?
Bitmap bmap = new Bitmap(B2);
int width = bmap.Width;
int height = bmap.Height;
for (int y = 0; y < height; y++)
{
for (int x = 0; x < width; x++)
{
Color c = bmap.GetPixel(x, y);
float h, s, b;
h = c.GetHue();
…

Sauce
- 3
- 3
0
votes
1 answer
How to convert HSV(HSB) to range 0...1
I get HSB as 29, 90, 100.
How to convert it to the range 0...1?
UIColor is initialized only in this range, so I have a question.
let red: CGFloat = 1
let green: CGFloat = 0.5372
let blue: CGFloat = 0.0941
let hueOut = 29
let satOut = 90
let…

Ozarenie
- 7
- 2
0
votes
3 answers
Colour patterns or functions, pyxplot
I'm using a program called pyxplot and I'm doing some colourmaps.
To specify the colors, I can use RGB, HSB or CMYK patterns using
set colourmap ( rgb:: |
hsb:: |
cmyk::: )
All values…

PerroNoob
- 843
- 2
- 16
- 36
0
votes
1 answer
Changing Contrast and Saturation for a given Color Channel in JavaScript
I know how to build color channels in JavaScript (iterate through an image and place each color value in an array). I would like to be able to change Contrast and Saturation for a given color channel. For example, use the CSS3 Contrast or…

TonyLuigiC
- 185
- 1
- 2
- 13
0
votes
0 answers
Java change saturation giving distorted colors
I am trying to change the saturation of an image by a certain amount but I am getting some strange results. I am using the following code
// shiftAmount should be a float value between -1 and 1
public static int[] saturation( int[] pixels, float…

Luc Drenth
- 3
- 1
- 4
0
votes
1 answer
how to directly convert between HSB color and Lab color in Processing / Java
I am trying to convert back and forth between HSB color and Lab color in Processing / Java. I know that I can first convert HSB to RGB then to Lab, is it possible to directly convert from HSB to Lab? If so, how to do that?
Thanks a lot!

John Stone
- 53
- 9
0
votes
1 answer
How to convert HSB to hex in Swift 5
I have a Color with HSB(Hue, Saturation, Brightness) values, and I want the convert RBG into a Hexadecimal string directly. How can I do that? Is there an approach without using the UIColor APIs, I'd like to implement my own function
Like:
func…

Difeng Chen
- 155
- 1
- 1
- 9
0
votes
1 answer
How can I make a HSB colour that was acquired from the COLOR class to become translucent (semi-transparent)?
So I have made a health bar that changes colour depending on the health of the individual. But I wanna make it so that when the player walks under the health bar, it turns it translucent and I am wondering how do I do that if the health bar is made…

Something.coding
- 15
- 3
0
votes
1 answer
Java hsb degrees or 255
I was wondering if when you call color.HSBtoRGB if the hue value would be entered as a range of 0-255, 0-1, 0-360? I am inquiring because I am trying to convert an edge angle to a color but it is only giving me blue or purple? can anyone explain…

mark anthony
- 3
- 7
0
votes
1 answer
How can I duplicate Sass color functions in Sketch.app?
Is there a way to use the equivalent of Sass color functions, like lighten and darken, to create color swatches in Sketch.app?
For example, original color #02284B
with Sass, I can use darken(#02284B, 2%); which will render as #022341
Is there an…

rolfsf
- 1,853
- 3
- 24
- 34
0
votes
0 answers
Converting RGB ff/80/80 does not return HSV (HSB) 0/50/100
I know that the direct conversion from RGB to HSV/HSB is difficult. But the values I get are far away from my expectation.
compare to http://www.rapidtables.com/convert/color/hsv-to-rgb.htm
and…

Titanium
- 83
- 1
- 4