Code Monkey home page Code Monkey logo

colormixer's Introduction

Color Mixer

A Java implementation of the Kubelka-Munk Theory of Reflectance for mixing RGB colors. This implementation uses a simplified version of the Kubelka-Munk model that assumes all colors have the same concentration when blending and that all colors are opaque.

WARNING: Currently this project seems to have some issues with the implementation and some color mixes do not result in the expected colors. Unfortunately I do not currently have the time or insight to fix the issue(s). Pull requests very welcome.

Goal

The ultimate goal of this project is to have a intuitive (subtractive color model) yet accurate color mixing function of the form:

Color mix(Color a, Color b)

Usage

The KMColorUtils class contains two mix methods for conveniently mixing java.awt.Color objects.

public static Color mix(Color colorA, Color colorB);

public static Color mix(Color... colors);

References:

  1. P. Kubelka, F. Munk, An article on optics of paint layers, August, 1931. (Translated from German by Steve Westin). http://www.graphics.cornell.edu/~westin/pubs/kubelka.pdf

  2. Chet S. Haase and Gary W. Meyer. 1992. Modeling pigmented materials for realistic image synthesis. ACM Trans. Graph. 11, 4 (October 1992), 305-335. DOI=10.1145/146443.146452 http://doi.acm.org/10.1145/146443.146452

  3. Blatner, A.M., Ferwerda, J.A., Darling, B.A. and Bailey, R.J. (2011) TangiPaint: a tangible digital painting system. Proceedings IS&T/SID 19th Color Imaging Conference, 102-107. http://www.cis.rit.edu/people/faculty/ferwerda/publications/2011/blatner11_cic.pdf

  4. Verification of the kubelka-munk turbid media theory for artist acrylic paint by M Mohammadi, R Berns, 2004. http://art-si.org/PDFs/Processing/KMreport_10_01.pdf

License:

Released under the MIT License (MIT)

colormixer's People

Contributors

benjholla avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.