Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[WIP] Color Mixer / Randomizer

Discussion in 'Works In Progress - Archive' started by LukasKallenbach, Aug 19, 2015.

  1. LukasKallenbach

    LukasKallenbach

    Joined:
    Oct 10, 2012
    Posts:
    12
    EDIT: Released this to the asset store - Link

    Hi,

    I've just started to work on a tool that can mix 2-6 colors and then return a random color from the resulting "color space".

    The main use case will be randomizing colors for procedurally generated content, my best example what it could be useful for at this point would be generating colors for e.g. autumn leaves.

    Screenshot 2015-08-19 16.42.04.png

    Here's a screenshot of some basic particles using the randomized colors:

    Screenshot 2015-08-19 16.30.10.png

    I will be developing and testing this further, and maybe even for other purposes than just randomizing colors.
    Possible features I'm considering:
    - A slider for each color to adjust its influence / weighting in the circle
    - An option to adjust whether or how much colors are blended in the circle
    - An API to return a color from polar coordinates, so that the tool could also be used for fading colors of objects between complex gradients

    The algorithm that creates the "color circle" may also still be changed / improved.

    I'd be interested in getting feedback on the idea, if / how this could be useful for you, what features you'd like to see added.
     
    Last edited: Oct 29, 2015
  2. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    Hi just noticed this thread, but is it possible or will it be possible to change the colors' Alpha in order to get some transparency or the developers choice? if that is / will be the case i could definitely see this being used in 3d fantasy games of any kind of subgenre (platformer, rpg, rts, you name it :D) especially (at this current moment!) when using particles that moves or behaves like the ones in Kokiri Forest in TLoZ: OoT back in the N64 days ;) i would definitely buy for that kind of purpose ;) great job on it so far, and will be looking forward to see more of this asset :D
     
  3. LukasKallenbach

    LukasKallenbach

    Joined:
    Oct 10, 2012
    Posts:
    12
    Transparency is supported, each color's transparency can be adjusted using Unity's color pickers.
    Screenshot 2015-08-19 18.24.45.png
     
  4. LukasKallenbach

    LukasKallenbach

    Joined:
    Oct 10, 2012
    Posts:
    12
    Another work in progress screenshot...

    Screenshot 2015-08-22 08.52.37.png

    I added weighting sliders that determine how strong each color influences the circle.

    At this point, I'm wondering if it would look better or be more useful to apply the color weightings more like in a pie chart than using the current approach based on circles around the color pickers. However, the pie chart approach might require placing the color pickers somewhere else, or constantly repositioning them according to the size of their "pie slice", so I would have to figure out a reasonable solution for that.
     
  5. LukasKallenbach

    LukasKallenbach

    Joined:
    Oct 10, 2012
    Posts:
    12
    I've created a testing / example scene for the color randomizer script, here a few screenshots:

    Screenshot 2015-08-28 13.25.07.png Screenshot 2015-08-28 13.27.18.png Screenshot 2015-08-28 13.28.39.png
     
  6. LukasKallenbach

    LukasKallenbach

    Joined:
    Oct 10, 2012
    Posts:
    12
    First released version is up in the asset store!

    Link