texstudio icon indicating copy to clipboard operation
texstudio copied to clipboard

Colour Picker

Open aleksejalex opened this issue 3 years ago • 8 comments

Hi, I think it would be great to implement simple colour picker (wheel like for example or any other). I'm pretty sure Qt has something like that already 'built in'.

Any answer on that will be highly appreciated.

aleksejalex avatar Dec 13 '21 20:12 aleksejalex

Geany has one. Maybe it could be possible to use its code freely.

tmelorc avatar Dec 20 '21 23:12 tmelorc

Geany has one. Maybe it could be possible to use its code freely.

Yeah, maybe it'll work

aleksejalex avatar Dec 20 '21 23:12 aleksejalex

Hi I was working on implementing a color picker, couple of questions I need help on to implement:

  1. I was thinking the code would be \colorx package, is this basically what everyone is using?
  2. I am having trouble finding a pointer in the code that gets me the latex document and cursor location. I have been looking through the code but if anyone can point me in the direction then I can begin implementation.

I was thinking about a quick standard color picker (available in Qt already) that just pops in the \colorx{RGB} code at cursor location, would that meet the needs of users?

fjpereny avatar Jul 21 '22 05:07 fjpereny

Hello. This could lead to a very long discussion. So, some points to be in mind:

  1. the picker will insert only the color code (rgb, cmyk, ...)
  2. the picker will insert also color by names, supported by latex packages
  3. the picker will insert the whole code around the selected text or the whole code with empty braces if no text was selected
  4. the picker contains options to control the action

Well, the first idea could be the simplest one. The picker window does not block the txs window. So we can open it and continue working on the text and selecting words and insert colors and so on. This could be useful for repetitions.

About its action, I think that the situation could be number 3 above.

Regards and thanks.

tmelorc avatar Jul 21 '22 15:07 tmelorc

In addition, usually I use xcolor package and \textcolor{<colorname>}{<text>}. Rarely I use {\color{<color>} text} syntax from base LaTeX.

tmelorc avatar Jul 21 '22 15:07 tmelorc

Hi, I think colorx is the most used and totally sufficient

On Thu, Jul 21, 2022, 07:30 Frank Pereny @.***> wrote:

Hi I was working on implementing a color picker, couple of questions I need help on to implement:

  1. I was thinking the code would be \colorx package, is this basically what everyone is using?
  2. I am having trouble finding a pointer in the code that gets me the latex document and cursor location. I have been looking through the code but if anyone can point me in the direction then I can begin implementation.

I was thinking about a quick standard color picker (available in Qt already) that just pops in the \colorx{RGB} code at cursor location, would that meet the needs of users?

— Reply to this email directly, view it on GitHub https://github.com/texstudio-org/texstudio/issues/2018#issuecomment-1191056161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6X7J7WCHEU5FXAQ64AFM3VVDN6BANCNFSM5J7BKJSA . You are receiving this because you authored the thread.Message ID: @.***>

aleksejalex avatar Aug 07 '22 08:08 aleksejalex

I'll work on this when I have a bit of spare time.

fjpereny avatar Aug 09 '22 00:08 fjpereny

OK, great. Thanks!

aleksejalex avatar Aug 11 '22 10:08 aleksejalex