FEATURE REQUEST Color preview

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
comm5
New User
New User
Posts: 4
Joined: Mon Jul 17, 2017 7:19 pm

FEATURE REQUEST Color preview

Post by comm5 »

here comes my feature request. long time known from html editors i wanna ask for the same in the PB editor.

I'm working often with colors in my custom Ui's and if i need to know which color i used many lines above, i must hit the
values back into the color picker. annoying.

I suggest the following action:
If i move the mouse cursor over a color value in the source code, it would be nice when after 500ms of delay time, a small
square pop up and show the color.

see the gif anim.

thanks for realizing!

Image


looking forward
Last edited by comm5 on Wed Jul 19, 2017 1:29 pm, edited 1 time in total.
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Re: FEATURE REQUEST Color preview

Post by kenmo »

I have written an IDE tool which does exactly this, but it's Windows only (uses API).

It's not public though. I could clean up the code and post it.
comm5
New User
New User
Posts: 4
Joined: Mon Jul 17, 2017 7:19 pm

Re: FEATURE REQUEST Color preview

Post by comm5 »

kenmo wrote:I have written an IDE tool which does exactly this, but it's Windows only (uses API).

It's not public though. I could clean up the code and post it.

as long this feature is not native, pls clean your code and let me try :)
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: FEATURE REQUEST Color preview

Post by Dude »

comm5 wrote:If i move the mouse cursor over a color value in the source code, it would be nice when after 500ms of delay time, a small square pop up and show the color.
Good idea! +1
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Re: FEATURE REQUEST Color preview

Post by kenmo »

as long this feature is not native, pls clean your code and let me try :)
Try this tool "ColorPreview"
https://github.com/kenmo-pb/tools
If you don't trust the EXE, you can build the source yourself :)

The instructions are at the top of the source...
Add the EXE as an IDE tool with the "new sourcecode" and "load sourcecode" triggers.
Then next time you create/load, you should be able to preview colors by hovering over them.
comm5
New User
New User
Posts: 4
Joined: Mon Jul 17, 2017 7:19 pm

Re: FEATURE REQUEST Color preview

Post by comm5 »

thanks. It's working good to me. i'll use it until the feature come true :)

it would be nice, if the square always pop up in the middle by a color value:

Image


your code follow the cursor in Procedure TrackCursor() and changes the square position if the cursor is moved to another location:

Image

a fixed position would be perfect.
Post Reply