<commit_before><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ColorPickerHelp</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="AppleTitle" content="ColorPickerHelp">
<link href="style.css" rel="stylesheet" type="text/css" media="all"/>
</head>
<body>
  One color picker to rule them all!
</body>
</html><commit_msg>Add formatted and styled help page.<commit_after><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ColorPickerHelp</title>
<meta name="AppleTitle" content="ColorPickerHelp">
<style>
body
{
  font: 12px/1.5 -apple-system, -apple-system-font, HelveticaNeue, 'Helvetica Neue', Helvetica, sans-serif;
  color: rgb(75,75,75);
  text-rendering: optimizeLegibility;
  margin: 5vw;
}
h1
{
  font-size: 200%;
  font-weight: 300;
  margin: -0.25em 0 1em 0;
}
h2
{
  font-size: 100%;
  font-weight: bold;
  margin: 1.5em 0 -0.5em 0;
}
p
{
  margin: 1em 0;
}
a
{
  color: rgb(100,100,100);
}
a:hover
{
  color: rgb(75,75,75);
}
a:active
{
  color: rgb(25,25,25);
}
</style>
</head>
<body>
<div>

<h1 id="persistent_color_picker_help">Persistent Color Picker Help</h1>

<p>Persistent Color Picker turns the default Mac OS X Color Picker into a stand-alone utility with copy and paste support for various code formats.</p>

<h2 id="copy_and_paste_formats">Copy and Paste Formats</h2>

<p>You can choose the format to use from the “Copy As…” item in the “Edit” menu. The current values for the selected format are shown in the copy value preview bar in the bottom half of the window.</p>

<p>You can paste colors in any of the supported formats.</p>

<p>When any of the “NSColor” formats are selected, the current color is always converted to the “Generic RGB” color space. The other formats are always converted to the “sRGB IEC 61966-2-1” color space.</p>

<h2 id="color_conversion">Color Conversion</h2>

<p>The reproduce a color accurately, its representation should not only consist of its component values (such as “red”, “green”, and “blue” for the RGB <a href="https://en.wikipedia.org/wiki/Color_model">color model</a>), but should also contain a reference to a specific <a href="https://en.wikipedia.org/wiki/Color_space">color space</a>.</p>

<p>What makes this somewhat confusing, is that the color space is almost never an explicit value when a color representation is formatted as code. The reason for this is that most platforms define the color space implicitly.</p>

<p>On the web, all colors representations are in the sRGB color space. This is why the HTML and CSS formats are converted to and from “sRGB IEC 61966-2-1” when you copy or paste.</p>

<p>On iOS, all colors and any content is assumed to be in the sRGB color space as well. This is why the “UIColor” formats are converted to and from “sRGB IEC 61966-2-1” when you copy or paste.</p>

<p>Mac OS X includes the ColorSync color management API which allows conversion between color models and color spaces. However, the recommended way to represent colors in code is with “colorWithCalibrated” which uses the “Generic RGB” color space. This is why the “NSColor” formats are converted to and from “Generic RGB” when you copy or paste.</p>

<h2 id="rgb_sliders">RGB Sliders</h2>

<p>Most of the Color Picker panels default to the “Generic RGB” color space. This can be confusing when you’re working with CSS, HTML, or iOS code where colors are assumed to use the sRGB color space instead.</p>

<p>For example, when you choose a color from the “Color Wheel” panel, and then switch to the “RGB Sliders” in the “Color Sliders” panel, the values of the “Red”, “Green”, and “Blue” sliders as well as the value in the “Hex Color” field won’t match the values you’ll see in the copy value preview bar. </p>

<p>You can make these fields show the correct values when you click the gear button at the top of the panel, and then choose the “sRGB IEC 61966-2-1” color space from the dropdown.</p>

<p>Since this is a bit cumbersome, we’ve added a shortcut button in the copy value preview bar that you can use to quickly convert the current color to the color space of the selected “Copy As…” format. This button is disabled when the current color is already in the same color space as the selected code format.</p>

</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.11008137432188066, 'fraction_numerical': 0.024638336347197108, 'mean_word_length': 4.510585305105853, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 1, '>': 69, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1693845', 'n_tokens_mistral': 1458, 'n_tokens_neox': 1359, 'n_words': 615}