Changing the data color in table regardless of being editable or not

  • 27 June 2024
  • 3 replies

Userlevel 1
Badge +3

As you know, cell values are shown black when they are read-only and blue otherwise as given below.

I would like to be able to set a specific text color, regardless of whether it is read-only or not. I wonder if there is a way to do it?

P.S. I know we can change the background color in a cell with annotation but there are times where I need to change both the background color and the text color.


Best answer by gabiservidone 11 July 2024, 22:44

View original

3 replies

Userlevel 5
Badge +6

In the Contract Allocation example, I used background annotation, theme to change the font color when editing and a custom css to change the font when there are default data:

But more specific to your current problem, use this color variable to change from AIMMS blue to any other color you’d like: --color_text_edit-select-link

Userlevel 1
Badge +3

Hi @gabiservidone ,

Thanks, this information helps me to some extent, but what I really want is : you know we can give condition-based specific background color to cells by defining a string parameter and using it as annotation identifier. I am wondering if we have the same flexibility for text color in the cells.




Userlevel 5
Badge +6

Gotcha, yes, it is possible. As you know, for background annotation, the CSS code would be:

.annotation-reach-maximum {     background: red; }


To change the background and the font color using same annotation, the CSS code would be:

.tag-table .grid-viewport .annotation-reach-maximum {

    background: red;

    .cell-wrapper {

        color: whitesmoke;




Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator