? ?
avatar sakiss
sakiss
22 Dec 2020

Steps to reproduce the issue

Assign a color field in an article and check it in the front-end.

Expected result

Colored element (square, circle, whatever)

Actual result

Color in hex. text format

color_custom field front-end

System information (as much as possible)

Joomla 4.0 beta6

avatar sakiss sakiss - open - 22 Dec 2020
avatar joomla-cms-bot joomla-cms-bot - change - 22 Dec 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Dec 2020
avatar drmenzelit drmenzelit - change - 23 Dec 2020
Labels Added: ?
avatar drmenzelit drmenzelit - labeled - 23 Dec 2020
avatar C-Lodder
C-Lodder - comment - 23 Dec 2020

I think the HEX is expected, so it can be used accordingly. Not sure what benefit a "Coloured element (square, circle, whatever)" would be.

avatar drmenzelit
drmenzelit - comment - 23 Dec 2020

You can create an alternative layout for the color field and render a div container with the color value of the field.

grafik

That is an example I created for a tutorial.

avatar drmenzelit
drmenzelit - comment - 23 Dec 2020
avatar sakiss
sakiss - comment - 24 Dec 2020

Thank you for the replies.

I was hoping to integrate that in the core, since a hex. code does not mean a lot to a regular user.

I can prepare a PR, if it has chances to get merged.

avatar bembelimen bembelimen - change - 27 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-27 23:46:02
Closed_By bembelimen
avatar bembelimen bembelimen - close - 27 Dec 2020
avatar bembelimen
bembelimen - comment - 27 Dec 2020

The hex code is exactly the expected result, as @C-Lodder pointed out, a coloured element does not make much sense in a generic way. To make is specific, just mkae an override and build your own element.

avatar sakiss
sakiss - comment - 28 Dec 2020

a coloured element does not make much sense in a generic way

Still do not understand how the hexademical code makes more sense, than the visual color.

Add a Comment

Login with GitHub to post a comment