Questions tagged [hsb]

59 questions
3
votes
1 answer

Change Opacity in HSB Colormode

I am trying to change the opacity of my strokes, but not sure how do it in HSB color mode. Or, if I switch to RGB mode how do I make the color change over time? Here is my code: (Any help would be appreciated) float rainbow=0; int dir=1; void…
2
votes
1 answer

HSB smooth color transition

I made a Happy Mothers day program that involved text slowly changing colors. I'm using HSB, and slowly changed the Hue value until I got to 255 then jumped back to 0. But this doesn't seem to give that smooth color transition I'm looking for. This…
KoderM
  • 382
  • 2
  • 15
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
  • 6,048
  • 6
  • 34
  • 75
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…
Yonic Surny
  • 451
  • 6
  • 15
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
  • 100
  • 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
  • 2,104
  • 2
  • 23
  • 42
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,217
  • 4
  • 43
  • 79
1
vote
1 answer

I am not able to access my css and js file in public to my index.hbs in views folder

I am trying to access css and js file which is in public folder from index.hbs which is inside views folder. index.js file: const express = require('express') const path = require('path') // const hbs = require('hbs') …
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
  • 41
  • 9
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,818
  • 6
  • 39
  • 55
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
  • 9,412
  • 15
  • 59
  • 91
1
vote
1 answer

PGraphics set different colormode not working

I have the following code: import processing.video.*; import oscP5.*; import netP5.*; //sending the data to wekinator int numPixelsOrig, numPixels, boxWidth = 64, boxHeight = 48, numHoriz = 640/boxWidth, numVert = 480/boxHeight; color[] downPix =…
FutureCake
  • 2,614
  • 3
  • 27
  • 70
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
  • 183
  • 3
  • 16
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