Skip to content
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

Add cross-sectional charts and some examples to docs #406

Merged
merged 1 commit into from
Mar 1, 2020

Conversation

kimikage
Copy link
Collaborator

@kimikage kimikage commented Feb 25, 2020

This adds the cross-sectional charts previewed in #398 (comment).
Although there is discussion about the axis assignment (cf. #398 (comment)), but in this PR, it is as I originally defined. Since I am currently modifying the conversion codes for HSV, HSL, and HSI, I just want a way to visually check the S-V, S-L and S-I planes. (Edit: see: #407)

In addition, this PR changes some documents.

Comment on lines -47 to -48
julia> parse(Colorant, HSL(1, 1, 1))
HSL{Float32}(1.0f0,1.0f0,1.0f0)
Copy link
Collaborator Author

@kimikage kimikage Feb 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the intent of this example. I don't think this example is worth the documentation. However, this behavior is probably not what the users expect, so I included the example which passes a color instance to the second argument, as a warning.

Edit: Perhaps this may be a remnant of the old color(). 👻

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Comment on lines +124 to +133
You can convert colors to hexadecimal strings using the [`hex`](@ref) function.
Note that the conversion result does not have the prefix `"#"`.

```jldoctest example
julia> color = colorant"#C0FFEE"
RGB{N0f8}(0.753,1.0,0.933)

julia> hex(color)
"C0FFEE"
```
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hex had been documented only with a docstring, so I mentioned it a bit. I think hex and parse should be paired.

@codecov
Copy link

codecov bot commented Feb 25, 2020

Codecov Report

Merging #406 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #406   +/-   ##
=======================================
  Coverage   80.38%   80.38%           
=======================================
  Files          11       11           
  Lines         877      877           
=======================================
  Hits          705      705           
  Misses        172      172           

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 d07286d...d23f650. Read the comment docs.

Comment on lines -6 to -7
julia> using Colors; #hide

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not hidden.:sweat_smile:

Copy link
Member

@timholy timholy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic!

Comment on lines -47 to -48
julia> parse(Colorant, HSL(1, 1, 1))
HSL{Float32}(1.0f0,1.0f0,1.0f0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

docs/src/constructionandconversion.md Show resolved Hide resolved
@kimikage
Copy link
Collaborator Author

kimikage commented Mar 1, 2020

If you feel the charts are too small, please use the zoom function of your browser.:sweat_smile:

@kimikage kimikage merged commit 9c08ccb into JuliaGraphics:master Mar 1, 2020
@kimikage kimikage deleted the docs_crosssection branch March 1, 2020 11:21
u16(x) = (u8((x & 0xFFFF)>>8); u8(x))
u32(x) = (u16((x & 0xFFFFFFFF)>>16); u16(x))
b(bstr) = write(buf, bstr)
function pallet(c::Color)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

palette...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants