New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color Picker element for viz.ui #1615

Closed
wants to merge 4 commits into
base: master
from

Conversation

Projects
4 participants
@karandeepSJ
Copy link
Contributor

karandeepSJ commented Aug 11, 2018

This PR implements a Color Picker based on the HSV color model. It consists of a vertical bar that selects the hue and a square that selects the saturation and value for the selected hue.
The horizontal direction of the square corresponds to saturation and the vertical axis to value.
There is a small ring inside the square to track the colors selected. The colors in the square get updated whenever the hue is changed.
Refer to my blog post to know about the HSV color model and how I implemented this color picker.

colorpicker

@karandeepSJ

This comment has been minimized.

Copy link
Contributor

karandeepSJ commented Aug 11, 2018

What tests should I write for this? It is very difficult to check whether the right colors are being selected because of the precision in coordinates required.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Aug 11, 2018

Codecov Report

Merging #1615 into master will decrease coverage by 0.28%.
The diff coverage is 12.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1615      +/-   ##
==========================================
- Coverage   87.34%   87.06%   -0.29%     
==========================================
  Files         246      246              
  Lines       32266    32387     +121     
  Branches     3504     3517      +13     
==========================================
+ Hits        28184    28199      +15     
- Misses       3247     3353     +106     
  Partials      835      835
Impacted Files Coverage Δ
dipy/viz/ui.py 83.24% <12.39%> (-5.97%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 606739b...3b8163d. Read the comment docs.

@dmreagan dmreagan added the gsoc2018 label Aug 14, 2018

@dmreagan dmreagan added this to PR needs a review in Viz Module Aug 14, 2018

@dmreagan

This comment has been minimized.

Copy link
Contributor

dmreagan commented Aug 14, 2018

This is cool. A few quick thoughts:

  • It should respond to clicks in addition to drags.
  • There should be a little rectangle showing the current hue position
  • There should be a simple way for the user to get the color in RGB as (R, G, B)

@karandeepSJ karandeepSJ force-pushed the karandeepSJ:ColorPicker branch from 6c1389f to f000e65 Sep 6, 2018

@karandeepSJ karandeepSJ force-pushed the karandeepSJ:ColorPicker branch from f000e65 to 3b8163d Sep 8, 2018

@skoudoro

This comment has been minimized.

Copy link
Member

skoudoro commented Oct 9, 2018

Hi @karandeepSJ,

Can you move this PR on this repo : https://github.com/fury-gl/fury ?

Thank you!

@skoudoro

This comment has been minimized.

Copy link
Member

skoudoro commented Oct 15, 2018

Closing. This PR was moved to fury-gl/fury#20

@skoudoro skoudoro closed this Oct 15, 2018

@skoudoro skoudoro moved this from PR needs a review to Done in Viz Module Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment