Skip to main content

Command Palette

Search for a command to run...

APEX HEX Color Visualizer - Oracle APEX Plugin

Updated
2 min read

One of the most powerful and often underutilized features of Oracle APEX is Template Components. These allow us to encapsulate complex UI logic into reusable and easy-to-configure components.

In this post, we'll see how to "display colors" using a plugin. The goal is to go from showing a simple hex code (e.g., #FF4436) to a rich visual component with multiple customization options—dot, radio, square, badge, pill, etc.—usable in Interactive Reports.

APEX Color Visualizer Preview (This is the final result: a single plugin, multiple visual representations)

Anatomy of Our "APEX Color Visualizer" Plugin

For this example, we have designed a plugin that supports a large number of visual variations controlled by custom attributes.

1. Multiple Display Styles

The core of the plugin allows you to choose how to render the data using the STYLE attribute:

  • Pill: Ideal for prominent statuses.
  • Badge: Subtle, light background with colored border.
  • Radio / Dot: Minimalist indicators alongside the text.
  • Square: Palette-style color swatches.

2. Custom Attributes

What makes this plugin truly useful is its flexibility. We have defined attributes that can be configured directly from the Page Designer:

  • Size: Full size control (Extra Small, Small, Medium, Large, Extra Large).
  • Show Text: Option to hide the Hex code and leave only the visual indicator.
  • Shadow & Border: Boolean attributes to add depth or defined borders.
  • Position: Flexible alignment of the indicator relative to the text (left, right, top, bottom).

Plugin Options

You can view the full styles here: apex_color_visualizer.css

How to Use

Implementing it in your applications is simple, follow these steps:

  1. Create Your Report: Create an Interactive Report or Classic Report that contains a column with hex color codes.
  2. Select the Column: In Page Designer, select the color column.
  3. Change the Type: Change the column type to APEX Color Visualizer.
  4. Configure: Adjust the attributes (Style, Size, Shadow, etc.) according to your needs.

Plugin Configuration (Plugin configuration panel in Page Designer)

Resources

More from this blog

A little knowledge to share-Oracle APEX

17 posts

Soy Ingeniero de Aplicaciones desde el 2012, he trabajado con Oracle APEX desde el 2017en versiones 5, 18, 20, 21. En los ultimos años he desarrollado habilidades en CSS, JavaScript, Jquery y PlSql , I specialize in Oracle APEX (Oracle Application Express )