# Urgent Hue and Saturation filter

**URL:** https://discourse.processing.org/t/urgent-hue-and-saturation-filter/20051
**Category:** Libraries
**Created:** [April 23, 2020, 12:46am UTC](https://discourse.processing.org/t/urgent-hue-and-saturation-filter/20051 "2020-04-23T00:46:24Z")
**Posts on this page:** 4
**Page:** 2

<div class="post-metadata">

### Author: ![IRIGIMA](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/irigima/32/8951_2.png) [@IRIGIMA](https://discourse.processing.org/u/IRIGIMA)
#### Post date: [May 9, 2020, 7:35am UTC](https://discourse.processing.org/t/urgent-hue-and-saturation-filter/20051/21 "2020-05-09T07:35:43Z")

</div>

Hi.

It is for testing high resolution outputs.

---

<div class="post-metadata">

### Author: ![IRIGIMA](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/irigima/32/8951_2.png) [@IRIGIMA](https://discourse.processing.org/u/IRIGIMA)
#### Post date: [May 9, 2020, 7:40am UTC](https://discourse.processing.org/t/urgent-hue-and-saturation-filter/20051/22 "2020-05-09T07:40:00Z")

</div>

(Code on iPhone)

```auto
xmax=SCREEN_WIDTH()
ymax=SCREEN_HEIGHT()
graphics mode normal
fill color 0.1,0.1,0.1
fill rect 0,0 to xmax,ymax

graphics mode saturation

main:
r=rnd(1)
g=rnd(1)
b=rnd(1)
x=rnd(xmax)
y=rnd(ymax)
w=rnd(100)
h=rnd(100)
fill color r,g,b
fill rect x,y size w,h

goto main

```

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [May 9, 2020, 4:59pm UTC](https://discourse.processing.org/t/urgent-hue-and-saturation-filter/20051/23 "2020-05-09T16:59:15Z")

</div>

> [@IRIGIMA](#):
>
> (Code on iPhone)

What app are you using to run that code?

---

<div class="post-metadata">

### Author: ![IRIGIMA](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/irigima/32/8951_2.png) [@IRIGIMA](https://discourse.processing.org/u/IRIGIMA)
#### Post date: [May 9, 2020, 7:52pm UTC](https://discourse.processing.org/t/urgent-hue-and-saturation-filter/20051/24 "2020-05-09T19:52:42Z")

</div>

Called SmartBasic.  
Very fast ! and been using for ~ 3 years now.  
Perfect for experimentation.

I have currently got something running, but not right.  
Here is what is supposed to happen which is required in sequence:

Create an external high resolution screen.  
Fill the screen with R=G=B (any grey scale but not 0,0,0 otherwise nothing will happen)

Loop:  
Select any rectangular area on external screen.  
Assign a random colour (RGB) value for the rectangular area.  
Convert the HSB value from the Random colour (RGB) assigned to this rectangle. Will be a constant (A)  
Go through every pixel in the rectangular area and change its HSB S value with (A).  
Draw the result. (Simulating a Saturation overlay of the rectangle on main screen)  
Repeat loop.

Does that make sense??

[Previous page](https://discourse.processing.org/t/urgent-hue-and-saturation-filter/20051.md?page=1)
