Questions tagged [hsb]

57 questions
3
votes
2 answers

Generate a n-color rainbow palette

I'm trying to generate a rainbow with 15 different colors with (runnable code here): size(360,100); colorMode(HSB, 360, 100, 100); // Hue in degrees in [0, 360], // saturation/brightness in [0, 100] …
Basj
  • 29,668
  • 65
  • 241
  • 451
2
votes
2 answers

Get and change hue of SKSpriteNode's SKColor(HSBA)?

A SKSpriteNode's SKColor has a way to be created with Hue, Saturation, Brightness & Alpha: let myColor = SKColor(hue: 0.5, saturation: 1, brightness: 1, alpha: 1) mySprite.color = myColor How do I get at the hue of a SKSpriteNode and make a…
Confused
  • 5,839
  • 6
  • 26
  • 65
2
votes
1 answer

How to apply HSB color filters to UIImage

I've been struggling for a few days for a project on UIImage colorization. The idea is that the app will embark a set of images that I will have to colorize with values retrieved from a webservice. Some sort of themes if you wish. The designer I…
yonicsurny
  • 423
  • 6
  • 14
2
votes
1 answer

Problems with repaint JLabel, Image application

So this is our code... we´re nobs and need a bit help with getting our buttons to switch between showing hue/saturation/brigntness in height and width. Per now, our applications is only showing hue in width and saturation in height. Our buttons are…
DeSoto
  • 90
  • 9
2
votes
1 answer

Sort list of colors by HSV/HSB

I am looking to sort a very long list of colors by their HSV/HSB values. I would like to sort them by Hue, then Sat, then Bright. Really all I need is a way to tell if one color comes "before" or "after" based on that order of HSV since I am just…
Marty
  • 1,848
  • 2
  • 19
  • 37
2
votes
1 answer

how to get brightness from UIColor correctly?

i try to do method which takes B(brightness) from UIColor. problem is in second part of method. when i log result bri is equal to _red. Where's problem? -(void)rgbToHSBWithR:(float)_red G:(float)_green B:(float)_blue { _red = _red / 255.0; _green…
Tomasz Szulc
  • 4,081
  • 3
  • 38
  • 78
1
vote
1 answer

HSB Color Picker

For a school assignment, I need to do something like this: The 500x500 rectangle should show the different hue, saturation, and brightness of whatever color the mouse is pointing at, kind of like a Color Picker. But since I suck at coding so much,…
user15604607
1
vote
0 answers

CSS hue-rotate/saturate/brightness not accurately showing some colors

I'm using Javascript to filter/shift a red icon image to another color specified in RGB. More specifically, I'm using CSS filters hue-rotate, brightness and saturate to shift colors from pure red to my target color. My result works well for many…
Krulwich
  • 21
  • 8
1
vote
2 answers

How do I create a desaturated version of a Display P3 color?

I have a color UIColor(displayP3Red: 1, green: 0, blue: 0.8, alpha: 1). I want to create a desaturated version of this — with the same hue and brightness, but less saturation, like half the saturation of the original. How do I do this?
Kartick Vaddadi
  • 4,265
  • 5
  • 33
  • 45
1
vote
1 answer

How to set HSV color range in OpenCV?

I have a phone and it's HSV histogram like blow,and I want to track this phone's movement.Based on it's histogram,I set image range like this: greenLower = (300, 0, 50) greenUpper = (50, 128,250 ) cv2.inRange(hsv, greenLower, greenUpper) But…
Alex Luya
  • 7,516
  • 12
  • 51
  • 78
1
vote
1 answer

From RGB to HSV (Color.RGBtoHSB) in Java returns a different result

I'm trying to change the color of some images in JavaFX. If, for example, I insert these RGB values (185, 74, 72) I get a different result. I checked the RGB result with Paint and it is (205, 183, 183). Anyone of you knows why? This is the code: …
db92
  • 193
  • 2
  • 15
1
vote
0 answers

Setting graphics variable from Image to HSBColor

I'm trying to set the colour of g1 to HSBColor, I'm converting a Java program to run in c# so need someone to point me in the right direction. g1 = Graphics.FromImage(picture); g1 = Color.???? Below is the struct created for HSBColor: public…
user2326995
  • 163
  • 1
  • 11
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…
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