# Help creating an ArrayList of color values

**URL:** <https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475>\
**Category:** Beginners\
**Created:** [March 7, 2020, 6:25am UTC](https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475 "2020-03-07T06:25:26Z")\
**Posts on this page:** 5\
**Page:** 2

<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:** [March 18, 2020, 9:11pm UTC](https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475/21 "2020-03-18T21:11:24Z")

</div>

> [@Eyetoof](#):
>
> BTW I am red/green color blind/deficient an I am trying to make a program to confidently generate harmonious color palettes from a base color.

There are two color blindness liibraries for Processing.

> **[GitHub - hx2A/ColorBlindness: Processing library for simulating color blindness](https://github.com/hx2A/ColorBlindness)**
>
> Processing library for simulating color blindness. Contribute to hx2A/ColorBlindness development by creating an account on GitHub.

Homepage: [ColorBlindess: Processing Library | ixora.io](https://ixora.io/projects/colorblindness/)

This is the one available through Contributions Manager if you search ColorBlindness.

Second:

> **[GitHub - tsarjak/ColorBlindness-Processing-Library: This library simulates...](https://github.com/tsarjak/ColorBlindness-Processing-Library)**
>
> This library simulates and corrects images to ease differentiation of colors for colorblind people - GitHub - tsarjak/ColorBlindness-Processing-Library: This library simulates and corrects images t...

Writeup: [Image Processing Library to Ease Differentiation of Colors for People with Colorblindness | by Processing Foundation | Processing Foundation | Medium](https://medium.com/processing-foundation/image-processing-library-to-ease-differentiation-of-colors-for-people-with-colorblindness-cc550f0670e0)

Both support Daltonization.

I just found the second on accident – it was a 2017 GSOC project. I’m not sure why the project was done to create a second library, or what needs it addressed that were not addressed by the first one.

---

<div class="post-metadata">

**Author:** ![Eyetoof](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@Eyetoof](https://discourse.processing.org/u/Eyetoof)\
**Post date:** [March 18, 2020, 9:20pm UTC](https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475/22 "2020-03-18T21:20:30Z")

</div>

Cool thank you Jeremy but, I am not trying to alter the stuff to correct for colorblindness.

I am just trying to make a program that generates harmonically sound color selection just by numbers. It’s just meant to be a confident “starting place”. Which can be tweaked to perceptual taste beyond that.

As my image previously tries to show. It would be trivial to code this with a subtractive wheel as the numerical offsets would be consistent from any “seed hue” on the wheel. Not the same situation with the additve wheel.

I don’t believe you can “correct” for color blindness, that would be like boosting the high frequencies in audio for some one who has less hearing in upper registers. They might hear a bit of a change, but they can’t really hear those frequencies so no amount of boost will do any good. 🙂 And it won’t make for nice sounding music.

It’s a complex issue especially to those trying to “see” what we “see”. Your still “seeing” it through normal color range vision.

---

<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:** [March 18, 2020, 9:27pm UTC](https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475/23 "2020-03-18T21:27:19Z")

</div>

Absolutely, @Eyetoof – not my area of expertise, and I didn’t mean to presume that Daltonization would solve your problem off-the-shelf. Those are just Processing libraries that specifically do color palette management and mapping in a related problem area – I thought that, like toxiclibs, the source code might be worth a peek to see if there was any interesting code inside that could help you with your creative problem. Please accept my apologies if I gave any offense.

---

<div class="post-metadata">

**Author:** ![Eyetoof](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@Eyetoof](https://discourse.processing.org/u/Eyetoof)\
**Post date:** [March 18, 2020, 9:31pm UTC](https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475/24 "2020-03-18T21:31:13Z")

</div>

Jeremy -

Oh man no offense at all !!! Sorry if it came off like that. 🙂 I actually realy appreaciate your efforts to help. I DO think the Toxic Labs stuff might be just what I am looking for. ANd I am really grateful for that tip. It is a really complex issue, and so I am very used to trying to explain it. its all good for sure.

I am still newb at how to utilize libraries. So it will take me some digging to figure Toxi out but I think it may very well be just what i need, algorithms to pick colors from the additive based upon subtractive space.

The fact that I am not finding a lot, makes me feel like developing this stuff is really worthwhile too :).

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [March 19, 2020, 8:49pm UTC](https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475/25 "2020-03-19T20:49:14Z")

</div>

Hello,

Welcome to forum.

Some resources to add to this topic for all:

[https://processing.org/tutorials/color/](https://processing.org/tutorials/color/)  
[https://processing.org/examples/colorvariables.html](https://processing.org/examples/colorvariables.html)  
[https://processing.org/reference/color\_.html](https://processing.org/reference/color_.html)  
[https://processing.org/reference/](https://processing.org/reference/) See color. 🙂

> **[Color Gradients in Processing (v 2.0)](https://medium.com/@behreajj/color-gradients-in-processing-v-2-0-e5c0b87cdfd2)**
>
> This tutorial on color gradients is an overhaul of a prior version; hopefully it will prove more useful to creative coders who wish to work…

Its insightful to peruse the source but not always easy to find what you are looking for.  
Some of the Processing functions here:  
[Processing source code - PApplet.java](https://github.com/processing/processing/blob/master/core/src/processing/core/PApplet.java)  
Doing a search for “color(” for example narrows down the search and can be done for other functions.  
`:)`

[Previous page](https://discourse.processing.org/t/help-creating-an-arraylist-of-color-values/18475.md?page=1)
