Skip to content

Commit

Permalink
Updated to 1.0.1
Browse files Browse the repository at this point in the history
Added support for HSL in PDF
Added tooltips for better user experience
Fixed cursors in dragger and picker
  • Loading branch information
mikaelsundell committed Mar 2, 2024
1 parent 4bcae63 commit def3109
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if (APPLE)
set (MACOSX_BUNDLE_INFO_STRING ${project_name})
set (MACOSX_BUNDLE_BUNDLE_NAME ${project_name})
set (MACOSX_BUNDLE_ICON_FILE AppIcon.icns)
set (MACOSX_BUNDLE_LONG_VERSION_STRING "1.0.0")
set (MACOSX_BUNDLE_LONG_VERSION_STRING "1.0.1")
set (MACOSX_BUNDLE_SHORT_VERSION_STRING "1.0")
set (MACOSX_BUNDLE_BUNDLE_VERSION "1.0")
set (MACOSX_BUNDLE_COPYRIGHT "Copyright 2022-present Contributors to the ${project_name} project")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Colorpicker is a versatile Mac application designed to select and capture colors

| Download | Description |
| ----------------| ----------- |
| [<img src="resources/Download.png" valign="middle" alt="Icon" width="16" height="16"> Colorman v0.0.10](https://github.com/mikaelsundell/colorpicker/releases/download/release-v0.0.10/Colorpicker_macOS12_arm64_release.dmg) | [Apple Silicon macOS12+](https://github.com/mikaelsundell/colorpicker/releases/download/release-v0.0.10/Colorpicker_macOS12_arm64_release.dmg)

| [<img src="resources/Download.png" valign="middle" alt="Icon" width="16" height="16"> Colorpicker v1.0.0](https://github.com/mikaelsundell/colorpicker/releases/download/release-v1.0.0/Colorpicker_macOS12_arm64_release.dmg) | [Apple Silicon macOS12+](https://github.com/mikaelsundell/colorpicker/releases/download/release-v1.0.0/Colorpicker_macOS12_arm64_release.dmg)
| [<img src="resources/Download.png" valign="middle" alt="Icon" width="16" height="16"> Colorpicker v1.0.0](https://github.com/mikaelsundell/colorpicker/releases/download/release-v1.0.0/Colorpicker_macOS12_arm64_release.dmg) | [Intel x86_64 macOS12+](https://github.com/mikaelsundell/colorpicker/releases/download/release-v1.0.0/Colorpicker_macOS12_arm64_release.dmg)

Documentation
-------------

**How to use**

Colorpicker needs to be active to pick colors. The app is always active when launched but can be activated using `View > Active [A]`. Once active the application will show the current color interactivly in a hsl color wheel. Use the color picker button or `Edit > Pick [P]` to start. Colors will start to appear on the color wheel. To end the color pick tool use either `Right mouse button` or `Esc` to end. After color pick app will no longer be active, colors can now be checked by clicking on the in the color wheel.
Colorpicker needs to be active to pick colors. The app is always active when launched but can be activated using `View > Turn on [space]`. Once active the application will show the current color interactivly in a hsl color wheel. Use the color picker button or `Edit > Capture from pick [Enter]` to start. Colors will start to appear on the color wheel. To end the color pick tool use either `Right mouse button` or `Esc` to end. After color pick app will no longer be active, colors can now be checked by clicking on the in the color wheel.

**Display profile**

Expand Down
20 changes: 15 additions & 5 deletions colorpicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,11 @@ ColorpickerPrivate::pdf()
QTextTableCell cell = table->cellAt(0, 2);
QTextCursor cellcursor = cell.firstCursorPosition();
cell.setFormat(headerformat);
cellcursor.insertHtml("<h5 style='color:rgb(255, 255, 255)'>HSV</h5>");
if (display == Display::Hsv) {
cellcursor.insertHtml("<h5 style='color:rgb(255, 255, 255)'>HSV</h5>");
} else {
cellcursor.insertHtml("<h5 style='color:rgb(255, 255, 255)'>HSL</h5>");
}
}
// rgb
{
Expand Down Expand Up @@ -1758,13 +1762,19 @@ ColorpickerPrivate::pdf()
.arg(asBase64(png, format)));
cellcursor.insertImage(imageformat);
}
// hsv
// hsv and hsl
{
QTextTableCell cell = table->cellAt(i+1, 2);
QTextCursor cellcursor = cell.firstCursorPosition();
cellcursor.insertHtml(QString("<small><b>H:</b> %1%2</small>").arg(formatHsv(state.color, HsvChannel::H)).arg("<br>"));
cellcursor.insertHtml(QString("<small><b>S:</b> %1%2</small>").arg(formatHsv(state.color, HsvChannel::S)).arg("<br>"));
cellcursor.insertHtml(QString("<small><b>V:</b> %1%2</small>").arg(formatHsv(state.color, HsvChannel::V)).arg("<br>"));
if (display == Display::Hsv) {
cellcursor.insertHtml(QString("<small><b>H:</b> %1%2</small>").arg(formatHsv(state.color, HsvChannel::H)).arg("<br>"));
cellcursor.insertHtml(QString("<small><b>S:</b> %1%2</small>").arg(formatHsv(state.color, HsvChannel::S)).arg("<br>"));
cellcursor.insertHtml(QString("<small><b>V:</b> %1%2</small>").arg(formatHsv(state.color, HsvChannel::V)).arg("<br>"));
} else {
cellcursor.insertHtml(QString("<small><b>H:</b> %1%2</small>").arg(formatHsl(state.color, HslChannel::HslH)).arg("<br>"));
cellcursor.insertHtml(QString("<small><b>S:</b> %1%2</small>").arg(formatHsl(state.color, HslChannel::HslS)).arg("<br>"));
cellcursor.insertHtml(QString("<small><b>L:</b> %1%2</small>").arg(formatHsl(state.color, HslChannel::HslL)).arg("<br>"));
}
}
// rgb
{
Expand Down
51 changes: 42 additions & 9 deletions colorpicker.ui
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
</property>
<item>
<widget class="QToolButton" name="toggleDisplay">
<property name="toolTip">
<string>Shide or hide display area</string>
</property>
<property name="icon">
<iconset resource="colorpicker.qrc">
<normaloff>:/icons/resources/Collapse.png</normaloff>:/icons/resources/Collapse.png</iconset>
Expand Down Expand Up @@ -299,7 +302,7 @@
<item>
<widget class="QToolButton" name="togglePin">
<property name="toolTip">
<string>Toggle pin</string>
<string>Pin on top</string>
</property>
<property name="text">
<string/>
Expand Down Expand Up @@ -335,10 +338,10 @@
<item>
<widget class="QToolButton" name="toggleActive">
<property name="toolTip">
<string>Toogle active</string>
<string>Turn on</string>
</property>
<property name="text">
<string>Active</string>
<string>Turn on</string>
</property>
<property name="icon">
<iconset resource="colorpicker.qrc">
Expand Down Expand Up @@ -372,6 +375,9 @@
<pointsize>12</pointsize>
</font>
</property>
<property name="toolTip">
<string>Change capture color space</string>
</property>
<item>
<property name="text">
<string>Native display values</string>
Expand Down Expand Up @@ -568,6 +574,9 @@
</item>
<item>
<widget class="QSlider" name="aperture">
<property name="toolTip">
<string>Change aperture size</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down Expand Up @@ -718,6 +727,9 @@
</property>
<item>
<widget class="QToolButton" name="toggleColors">
<property name="toolTip">
<string>Show or hide colors area</string>
</property>
<property name="text">
<string>...</string>
</property>
Expand Down Expand Up @@ -837,6 +849,9 @@
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Change size of markers</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down Expand Up @@ -907,6 +922,9 @@
</property>
<item>
<widget class="QSlider" name="backgroundOpacity">
<property name="toolTip">
<string>Change background opacity</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down Expand Up @@ -946,7 +964,7 @@
<item>
<widget class="QToolButton" name="toggleClear">
<property name="toolTip">
<string>Clear colors</string>
<string>Remove all colors</string>
</property>
<property name="text">
<string/>
Expand Down Expand Up @@ -982,7 +1000,7 @@
<item>
<widget class="QToolButton" name="toggleDrag">
<property name="toolTip">
<string>Capture colors from drag</string>
<string>Capture colors with a sweep</string>
</property>
<property name="text">
<string>...</string>
Expand Down Expand Up @@ -1012,7 +1030,7 @@
<item>
<widget class="QToolButton" name="togglePick">
<property name="toolTip">
<string>Capture color from picker</string>
<string>Capture color with a picker</string>
</property>
<property name="text">
<string>...</string>
Expand Down Expand Up @@ -1083,6 +1101,9 @@
</property>
<item>
<widget class="QSlider" name="angle">
<property name="toolTip">
<string>Rotate color wheel</string>
</property>
<property name="maximum">
<number>100</number>
</property>
Expand Down Expand Up @@ -1139,6 +1160,9 @@
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string>Turn on IQ line</string>
</property>
<property name="text">
<string>IQ</string>
</property>
Expand All @@ -1155,6 +1179,9 @@
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string>Multiply saturation by 2</string>
</property>
<property name="text">
<string>2x</string>
</property>
Expand All @@ -1168,6 +1195,9 @@
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string>Turn on saturation labels</string>
</property>
<property name="text">
<string>Saturation</string>
</property>
Expand All @@ -1184,6 +1214,9 @@
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string>Turn on color labels</string>
</property>
<property name="text">
<string>Labels</string>
</property>
Expand All @@ -1205,7 +1238,7 @@
<item>
<widget class="QToolButton" name="pdf">
<property name="toolTip">
<string>Open pdf</string>
<string>Show PDF for colors</string>
</property>
<property name="text">
<string/>
Expand Down Expand Up @@ -1336,7 +1369,7 @@
<normaloff>:/icons/resources/Active.png</normaloff>:/icons/resources/Active.png</iconset>
</property>
<property name="text">
<string>Active</string>
<string>Turn on</string>
</property>
<property name="shortcut">
<string>Space</string>
Expand Down Expand Up @@ -1559,7 +1592,7 @@
</action>
<action name="drag">
<property name="text">
<string>Capture from drag</string>
<string>Capture from sweep</string>
</property>
<property name="shortcut">
<string>Shift+Return</string>
Expand Down
Loading

0 comments on commit def3109

Please sign in to comment.