Skip to content

Commit

Permalink
Updated note about alpha components.
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthernRealities committed May 29, 2015
1 parent 5801a19 commit 3637d5d
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -9,7 +9,7 @@ But with the plugin it becomes:

![Demo of the plugin](CSR_Demo.png)

If you click on the color then a color picker is displayed. As you choose colours the code is updated. One thing to note is if you select a predefined colour and start changing the colour then the code gets changed to RGB values. In the other cases I've tried to keep it as non-destructive as possible though at times the number of decimal places can change. When the alpha isn't specified (it isn't required as part of the Rainbow library as I set it to a default value of 1.0) then the plugin doesn't add the alpha component to the code. You'll have to do that manually.
If you click on the color then a color picker is displayed. As you choose colours the code is updated. One thing to note is if you select a predefined colour and start changing the colour then the code gets changed to RGB values. In the other cases I've tried to keep it as non-destructive as possible though at times the number of decimal places can change. When the alpha isn't specified (it isn't required as part of the Rainbow library as I set it to a default value of 1.0) then the plugin doesn't add the alpha component to the code. As of May 29, 2015 the plugin will now add the alpha component for you in Swift if you change the value in the colour picker.

This project was inspired from [Color Sense for Xcode](https://github.com/omz/ColorSense-for-Xcode). In fact it looks (and I think it behaves mostly) like it. But I built it completely from scratch in Swift though I did use that project as a template for some items as I haven't done anything on the Mac side before.

Expand Down
Binary file not shown.
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorSenseRainbow/ColorSenseRainbow.swift"
timestampString = "451842016.087175"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "155"
endingLineNumber = "155"
landmarkName = "selectionDidChange(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorSenseRainbow/PredefinedColorBuilder.swift"
timestampString = "452369110.601376"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "42"
endingLineNumber = "42"
landmarkName = "createSwiftColor(_:forSearchResult:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorSenseRainbow/CalculatedRGBBuilder.swift"
timestampString = "452226083.763559"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "26"
endingLineNumber = "26"
landmarkName = "stringForColor(_:forSearchResult:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorSenseRainbow/RGBCalculatedSeeker.swift"
timestampString = "452538679.105802"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "77"
endingLineNumber = "77"
landmarkName = "processMatch(_:line:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>ColorSenseRainbow.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>56B480D91AE2D6CC00B507E4</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

0 comments on commit 3637d5d

Please sign in to comment.