refactored to use java Color lib