All the colors!

ConnetIq folks. Free free to steal this or it's idea as a sample in the SDK. The 920 and f3, are only 16 color and it's not an issue, but the vivoactive and soon to be available Epix are 64 color. It might be easier than having "COLOR_*" names for the missing 48! :)

With only a small number of "COLOR_*" colors defined, and 64 colors on the vivoactive, I wanted to see ALL the colors looked like on the vivoactive. So here are the two source files I used. The second contains the smarts as to size of increment, and timer speed, etc. It's an app, and when it's started, it cycles trough all the colors each filling the top half of the screen, and shows you the hex version of the color, so you can use it in your code. The "start" button is used to start/stop the changes, so you can write down a color you like.

forgive any typos in words or styles!

ColorPaleteApp.mc
----------------------

using Toybox.Application as App;
using Toybox.WatchUi as Ui;

class ColorPaleteApp extends App.AppBase {

//! onStart() is called on application start up
function onStart() {
}

//! onStop() is called when your application is exiting
function onStop() {
}

//! Return the initial view of your application here
function getInitialView() {
return [ new ColorPaleteView(), new ColorPaleteDelegate() ];
}
}



ColorPaleteView.mc
-----------------------

using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.System as Sys;

var running=true;

class ColorPaleteView extends Ui.View {

var timer;
var cColor=0;
var cColorNum=0;

//you can set colors start here
var r=0;
var g=0;
var b=0;

function initialize()
{
timer = new Timer.Timer();

//set timer value here

timer.start( method(:onTimer), 750, true );
Sys.println((Gfx.COLOR_YELLOW).format("%06X"));
}

function onTimer()
{
//change to the next color.
if(running)
{
b=b+3;
if(b>15)
{
b=0;
g=g+3;
if(g>15)
{
g=0;
r=r+3;
if(r>15)
{
r=0;
g=0;
b=0;
}
}
}
}
Ui.requestUpdate();
}

//! Load your resources here
function onLayout(dc) {
//setLayout(Rez.Layouts.MainLayout(dc));
}

//! Restore the state of the app and prepare the view to be shown
function onShow() {
}

//! Update the view
function onUpdate(dc) {
dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_BLACK);
dc.clear();

dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT);

cColor="0x"+r.format("%X")+r.format("%X")+g.format("%X")+g.format("%X")+b.format("%X")+b.format("%X");
cColorNum=(r*16+r)*(256*256)+(g*16+g)*256+(b*16+b);

dc.drawText( dc.getWidth() / 2, dc.getHeight()-65, Gfx.FONT_SMALL,"Start/enter to pause/continue!",Gfx.TEXT_JUSTIFY_CENTER);
dc.drawText( dc.getWidth() / 2, dc.getHeight()-40, Gfx.FONT_MEDIUM,"Color=0x"+cColorNum.format("%06X"),Gfx.TEXT_JUSTIFY_CENTER);

dc.setColor(Gfx.COLOR_WHITE,Gfx.COLOR_TRANSPARENT);
dc.drawRectangle(5, 5, dc.getWidth()-10, dc.getHeight()/2);
dc.setColor(cColorNum,Gfx.COLOR_TRANSPARENT);
dc.fillRectangle(6, 6, dc.getWidth()-12, dc.getHeight()/2-2);
}

//! Called when this View is removed from the screen. Save the
//! state of your app here.
function onHide() {
}

}

class ColorPaleteDelegate extends Ui.BehaviorDelegate {

function onMenuItem(item) {
}

function onKey(evt) {

if(evt.getKey()==Ui.KEY_ENTER)
{
running=!running;
return true;
}
else
{
return false;
}
}
}
  • I'd be happy if the RGB palette that is the input is reflected as closely as possible. So what I see in the simulator is as close as possible to what the user will see on the real device.

    Interesting idea to have the distortion simulated in the simulator. The distortion of the MIP display isn't constant (it depends on incident light angle and the backlight).

  • Ah, yeah, I even didn't think about that :) You're right. Though, the simulator could have the value for the "best angle". I wouldn't want the simulator to have a new menu where I can change the simulated view angle in 2d :) 

  • Exactly! But of course only one who has the physical device could do this measurement (though I wouldn't be surprised if Garmin didn't have to do it, just copy it from the display panel's manufacturer),

  • The sim and MIP devices have always looked very different - a far different display technology.  Back when there were only MIP watches, it was a known.  Today, maybe download a few watch faces that allow you to configure colors to see how things look.

  • How that helps?

    The developer should have a MIP device to test, and even then, we can only assume that different devices with similar specs (where the only info we can get is not much more* than the number of colors and a palette of RGB values that don't correspond well with the displayed colors)

    *) I noticed some more differences in the simulator.json, but haven't found out yet if it's useful

    Then you need 1 device with 8 colors, 1 with 64, etc... There are differences in 1 color of some of the devices, but I don't own those devices to be able to tell if the rest of the colors look the same or not.

    Funnily enough taking screenshots of the color palette with the watch itself doesn't help, as all you get is a picture with the same hexa values, that look the same on the monitors as the screenshots of the same hexa palette on an amoled display. The only thing that has some value is to take pictures of the watch using an external camera (i.e your phone) 

    I wrote here once that it would be a useful community effort to create a fit repo with the code of an app that would display the colors on every device, but the main goal would be that people who own some devices would take pictures of their device displaying the palette and uploading them to GitHub, so others who don't own the device could have some idea. But since I didn't receive any response I didn't start to work on it.

  • It could work only if you can guarantee that all MIPS devices of the same class have the same color tones. I'm not so sure if these screens can reproduce colors equally well.

    Also, to take most reliable colors, you need to have really good camera with all autocolor filters disabled and stable external lighting if you want to get many shots. Phone will not work, most of them are automatically "tuning" image colors to be more pleasant for a typical eye. Maybe RAW shooting, idk.