Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/templates/hex-to-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,31 @@ <h2 class="title">{{ title }}</h2>

<!-- Objective C -->
<div ng-show="hexValid" class="code-block">
<h3 class="language">Objective-C</h3>
<h3 class="language">Objective-C for iOS</h3>
<span>[UIColor colorWithRed:{{uiColor.r}} green:{{uiColor.g}} blue:{{uiColor.b}} alpha:{{alpha}}];</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copyObjectiveC"><i class="fa fa-files-o"></i></button>
</div>

<!-- Objective C -->
<div ng-show="hexValid" class="code-block">
<h3 class="language">Objective-C for MacOS</h3>
<span>[NSColor colorWithCalibratedRed:{{uiColor.r}} green:{{uiColor.g}} blue:{{uiColor.b}} alpha:{{alpha}}];</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copyObjectiveC"><i class="fa fa-files-o"></i></button>
</div>

<!-- Swift -->
<div ng-show="hexValid" class="code-block">
<h3 class="language">Swift</h3>
<h3 class="language">Swift for iOS</h3>
<span>UIColor(red:{{uiColor.r}}, green:{{uiColor.g}}, blue:{{uiColor.b}}, alpha:{{alpha}})</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copySwift"><i class="fa fa-files-o"></i></button>
</div>

<!-- Swift -->
<div ng-show="hexValid" class="code-block">
<h3 class="language">Swift for MacOS</h3>
<span>NSColor(calibratedRed:{{uiColor.r}}, green:{{uiColor.g}}, blue:{{uiColor.b}}, alpha:{{alpha}})</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copySwift"><i class="fa fa-files-o"></i></button>
</div>

<!-- Xamarin -->
<div ng-show="hexValid" class="code-block">
Expand Down
19 changes: 17 additions & 2 deletions src/templates/rgb-to-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,33 @@ <h2 class="title">{{ title }}</h2>

<!-- Objective C -->
<div ng-show="rgbValid" class="code-block">
<h3 class="language">Objective-C</h3>
<h3 class="language">Objective-C for iOS</h3>
<span>[UIColor colorWithRed:{{uiColor.r}} green:{{uiColor.g}} blue:{{uiColor.b}} alpha:{{alpha}}];</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copyObjectiveC"><i class="fa fa-files-o"></i></button>
</div>


<!-- Objective C -->
<div ng-show="rgbValid" class="code-block">
<h3 class="language">Objective-C for MacOS</h3>
<span>[NSColor colorWithCalibratedRed:{{uiColor.r}} green:{{uiColor.g}} blue:{{uiColor.b}} alpha:{{alpha}}];</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copyObjectiveC"><i class="fa fa-files-o"></i></button>
</div>

<!-- Swift -->
<div ng-show="rgbValid" class="code-block">
<h3 class="language">Swift</h3>
<h3 class="language">Swift for iOS</h3>
<span>UIColor(red:{{uiColor.r}}, green:{{uiColor.g}}, blue:{{uiColor.b}}, alpha:{{alpha}})</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copySwift"><i class="fa fa-files-o"></i></button>
</div>

<!-- Swift -->
<div ng-show="rgbValid" class="code-block">
<h3 class="language">Swift for MacOS</h3>
<span>NSColor(calibratedRed:{{uiColor.r}}, green:{{uiColor.g}}, blue:{{uiColor.b}}, alpha:{{alpha}})</span>
<button type="button" class="btn btn-default hidden-xs hidden-sm" clip-copy="copySwift"><i class="fa fa-files-o"></i></button>
</div>

<!-- Xamarin -->
<div ng-show="rgbValid" class="code-block">
<h3 class="language">Xamarin (C#)</h3>
Expand Down