-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update the APC Algorithm to be compatible with RGBA colors #443
Comments
Thank you for your comment. Project members are working on your comment. You may see discussion in the comment thread and we may ask for additional information as we work on it. We will mark the official response when we are finished and close the issue. |
I would also note that the work on color contrast has progressed considerably since we had to freeze the document before publishing. There is current information on our wiki page on Visual Contrast. The very latest information is on @Myndex 's Github repo: |
Pinging @Myndex because I remember seeing newer formulas that used RGBA. As @jspellman notes, the algorithm has been significantly refined since the version used for the first call public working draft. |
To All: @SFM61319 @jspellman @bruce-usab The code cited above is obsolete code, as is the document it resides in, and it has not been in use for over a year.I have a pending pull request to remove this material from that very early draft to avoid these kinds of confusions, as it is still linked to and appearing in search engines. Jeanne: This underlines the importance of that pull request. This is a serious problem as that code is not correct per the current version, and it is a substantial difference, and this is not the first time this confusion has occurred. Do I need to do anything else to get that pull request merged please? Also, Avinash just FYI, the correct place to discuss the code is at the APCA repo, at the following link, which is the only valid canonical repo for the code: https://github.com/Myndex/SAPC-APCA You are welcome to open an issue there, please make it relevant to version 0.98g — though to add, 0.98g is still a pre-release beta, and there are a number of features that are yet to be incorporated — this is development code, so features such as transparency, and packing things up into a neat class library and NPM package are in the future devmap, not implemented as yet. I am sorry for the confusion regarding the obsolete code!Thank you for your interest, Andy |
DRAFT RESPONSE: This issue will be resolved in part by the merge request on issue #213 . The other core topics in this issue pertain to the tool and not specifically to Silver. Issues related to tool code can be placed as issues in the GitHub repo https://github.com/Myndex/SAPC-APCA . |
Update regarding alpha channel supportStandard alpha channel support for text colors is available in the APCA-W3 Library, and blends the text with the background based on the alpha value prior to determining contrast. The repo is: github.com/Myndex/apca-w3 And it is published via npm: The APCA discussion forum is: github.com/Myndex/SAPC-APCA/discussions |
Hello.
I was reading the APCA (under the
Code Samples
tab) for two given RGBforeground
andbackground
colors, and realized that it works only for RGB colors, and not for RGBA colors.Alpha transparency plays a major role in color contrast along with the other RGB channels (even according to AA/AAA standards). And RGBA can be called a "super-set" of RGB, since RGBA is RGB when
a = 1
ora = 100%
, and covering RGBA will hence automatically cover RGB colors.Please consider updating the algorithm given in the site with the RGBA version of the algorithm (i.e., an algorithm that works for RGBA foreground and background colors too).
File to be edited: Method-font-characteristic-contrast.html
Also, on a side note, please:
RGBA
classes with useful properties which make the contrast calculation way easier (again, I can open a new issue just for this and submit a PR for this).The text was updated successfully, but these errors were encountered: