Colors in Oasis

Colors are an important part of presenting information, so in addition to traditional styling methods, dynamic styling can be applied to presented elements.

For example let’s start with this simple table:

Now lets create a model that adds some calculated columns, to this end result:

The first calculated column applies the equation Color("Color") to the Color column, converting it to a color type. The second applies the equation "Color(X)".getLightness() to get the numerical lightness value. The third calculates the hue with "Color(X)".getHue().

Now lets create a view with a chart to display this information differently:

This is a bubble plot using hue on the X axis, Lightness on the Y axis and the value column to set the bubble size. The color is set by the Color column. Item and color are shown as text above the circles.

About 50 color functions are available for modeling, allowing manipulation of red, green, blue, transparency, saturation, hue, lightness attributes. Colors can be shifted by hue, lightened and darkened by amounts or ratios, and blended together.

This post has shown how colors can be used in Oasis.

Back to Exploring

trudain.com | All content copyright (c) 2022-2024