|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 229
Karma: 2000
Join Date: Nov 2025
Device: none
|
FR: Add color preview in css
The new feature post has closed, so I post a new thread.
This is not a immediate request, just a reminder for me. Could devs add color preview in css? It's pretty annoying to switch back and forth between css and html. Like a little square or background color right at the color code. If this falls into "use external editor", then never mind. |
|
|
|
|
|
#2 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,151
Karma: 7640000
Join Date: Nov 2009
Device: many
|
I closed the thread so that people would understand we are nearing a new release and that the tree was closed to all new feature requests.
After the next release, I will open a new thread. That way everyone can see and comment and nothing is scattered about or gets lost. And fwiw, you never need to switch back and forth to see the impact of css changes in Preview. Simply open CodeView on a xhtml tab that is linked to your css, then next open the CSS tab. Preview keeps showing the last xhtml page shown. You can then edit the CSS tab in CodeView and see its impact in Preview. And finally adding a css colour picker inside CodeView for css is just not something we will be likely adding to Sigil, as there are a million OS utility tools that allow anyone to generate colour values. Use one if picking css colours is important. Last edited by KevinH; Today at 08:10 AM. |
|
|
|
|
|
#3 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,515
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Do you mean having a color wheel/picker that tells you what the correct color code would be?
eg. {background-color: #ff0000;} {background-color: rgb(255, 0, 0);} {background-color: rgba(255, 0, 0, 0.3);} {background-color: hsl(120, 60%, 70%);} {background-color: hsla(120, 100%, 50%, 0.3);} {background-color: red;} Here is a free website tool that allows for all the codes. I don't know the feasibility of adding a color wheel with a popup - Or even a button to open your favorite website?? Oooops - Ninja'd again! So much for trying to answer while at work!! Last edited by Turtle91; Today at 08:00 AM. |
|
|
|
|
|
#4 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,151
Karma: 7640000
Join Date: Nov 2009
Device: many
|
Or an OS system utility app, that can be colour corrected for display types, some even have droppers to sample colours.
Last edited by KevinH; Today at 08:06 AM. |
|
|
|
|
|
#5 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 229
Karma: 2000
Join Date: Nov 2025
Device: none
|
sure, VScode then.
|
|
|
|
|
|
#6 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,873
Karma: 212614993
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
A plugin might be able to be worked up that has a color picker that puts that color's code on the clipboard upon closing/returning.
PySide6.QtWidgets.QColorDialog |
|
|
|
|
|
#7 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 229
Karma: 2000
Join Date: Nov 2025
Device: none
|
|
|
|
|
|
|
#8 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,873
Karma: 212614993
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It doesn't yet exist. Hence my comment that one "might be able to be worked up."
|
|
|
|
|
|
#9 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,151
Karma: 7640000
Join Date: Nov 2009
Device: many
|
Sigil already has colour wheel widget used for picking colours for CodeView in Sigil Preferences. So using it with PyQt6 in a plugin should be straightforward if that helps anyone create a plugin.
|
|
|
|
|
|
#10 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,873
Karma: 212614993
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Here's a quick mock-up that comes back with the hex value on the clipboard whenever the OK button is clicked in the ColorDialog. Nothing is put on the clipboard when Cancel is clicked.
No whistles or bells (and its only been tested on Windows on my lunch break). Someone else would have to figure out how to preserve custom colors for future use. Hopefully it can get someone going, though. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| header color cannot be change with CSS | issam.seghir99 | Viewer | 0 | 11-24-2022 03:38 AM |
| css background-color: | jwilson5153 | Conversion | 1 | 07-18-2019 11:16 PM |
| Button to add CSS class | maicol07 | Sigil | 3 | 03-15-2019 02:25 PM |
| add css to specific page | Etshy | Calibre | 1 | 08-09-2017 08:33 AM |
| when does calibre add/not add page_styles css | cybmole | Calibre | 5 | 07-14-2014 03:58 AM |