-
Notifications
You must be signed in to change notification settings - Fork 47
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 a constant for the colors in the Julia logo #418
Conversation
Thank you for submitting this PR and your consideration for the cleanness of namespace.
The official definitions of the colors are found in https://github.com/JuliaLang/julia-logo-graphics. The difference is weird. 🤔 My concern is whether If we don't add the colors to the named colors, what about adding the cc: @cormullion |
It's a great idea! I think The color specifications currently originate from Luxor.jl:
so they're pretty close (I probably couldn't spot the difference, but I suspect you can, @kimikage :)). (The "julia-logo-graphics" repo is kind of official, now that it's been transferred from my github to JuliaLang. But there was never really any official specification of the logo or colors before then - the logo image just travelled around in various formats, and I eventually decided to pin it down and draw it procedurally.) |
@kimikage: I checked and the colors match the ones in julia.svg in the latest master. I checked the repo you linked and it is my understanding that it just draws colors from Luxor.jl --- while I like that package very much, I am not sure in what sense it is more official than the Julia repository. Naturally, if the colors are updated in the latter, that should be reflected here. The purpose of this PR is to make these colors easier to access when needed for Julia programs. I am not sure in what sense you consider the repo above an alternative; the colors are not accessible in code directly, they would need to be typed in from an image in that repository, which is tedious and error-prone. In order to avoid getting into the "which colors are official" debate, perhaps I should amend the docstring to say that it should just reflect whatever is in the Julia repository, and kept updated accordingly, without considering these changes breaking. |
Regarding the macro: I just prefer a constant. We are talking about a very small set of values after all, for which something like a |
|
As I want to use these colors for testing, I don't care which one is "official", but the existence of multiple possible answers is a concern.:confused: We should consider the possibility of the unification before merging this PR. And, first of all, the "copyright owner" should have the first say. I also think we should clarify the reason for the variation. To be precise, the cause itself is not so important, but we should make sure that the same problem does not recur. Some differences can be explained as rounding errors, but when it comes to "blue", they are clearly different colors.
Adding macros does not mean removing constants. We need a dictionary-like object to convert from strings to colors. However, the macro is just a possible idea. |
@cormullion, what happened in round2? It seems that the result of round2 is not the raw output of Luxor. Round2 (JuliaLang/julia#32038) IMO, https://github.com/JuliaLang/julia/blob/master/contrib/julia.svg should be changed. |
"what happened in round2" - I can't remember now, but I must have used the wrong file at some point. |
Frankly, I expected this PR to be rather trivial (conditional on the functionality being considered to have a place in this package), and I am somewhat surprised about the whole "which colors are official" discussion, with the claim that some other colors are, because they are used in a package that was ostensibly used to create the logo, which nevertheless ended up having different colors. The point of the whole PR is to just make using some colors that some people use anyway easier. I don't wish to invest too much in this, and I don't see the point of waiting for a resolution between the semi-official logo repo and the svg file. If/when that happens, colors here can change too. In any case, feel free to ignore/close/modify this PR. |
At least the discussion of "which color is official" ended. The current discussion is about "official" colors, not unofficial or semi-official. So, it's not appropriate to have that discussion in this PR or in Colors.jl. Edit: |
As the log of Travis CI shows, the document cannot be built due to the specification change of nightly build now. Although problem can be solved by ignoring the failure, I am currently exploring best practices. In the meantime, I leave this PR open. BTW, I want to add the swatches of the colors to the document. showable(::MIME"text/plain", ::AbstractVector{C}) where {C<:Colorant} = false # hide |
@kimikage, @cormullion: thanks for clearing this up. I have updated the colors accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-Authored-By: kimikage <[email protected]>
Co-Authored-By: kimikage <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #418 +/- ##
==========================================
+ Coverage 81.06% 81.29% +0.22%
==========================================
Files 10 10
Lines 882 882
==========================================
+ Hits 715 717 +2
+ Misses 167 165 -2
Continue to review full report at Codecov.
|
Thanks! |
The colors from the Julia logo are frequently used for various visualizations and logo designs, private or public, so I thought they would be useful in this package.
At the same time, I did not put them in the named colors namespace since they are unique to Julia, not a shared color name space like X11 or SVG (cf this comment by @kimikage). For the same reason, they are not exported, just mentioned in the docs.
Happy to make any changes.
(RGB color codes just extracted from the svg in the JuliaLang/julia repository with Inkscape).