Learn about the relationship between Hue, Saturation, Brightness, and Color Contrast. Minimum contrast level is set to 4.5 (AA).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <head> | |
| <link rel="stylesheet" href="style.css"> | |
| <script type="text/javascript" src="script.js"></script> | |
| <script src="https://d3js.org/d3.v4.min.js"></script> | |
| </head> | |
| <body> | |
| <svg width="1050" height="1500"></svg> | |
| </body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div style="width:1500px; height:1500px; background-color:pink"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \usepackage[utf8]{inputenc} | |
| \usepackage{wasysym} | |
| % Multiple choice question | |
| \newcommand{\mcqb}{{\Large$\Circle$}} | |
| \newcommand{\mcqs}{\solution{\mcqb}{\Large$\CIRCLE$}} | |
| % Multiple option question. | |
| \newcommand{\moqb}{{\Large$\Square$}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \usepackage{wasysym} | |
| % ---- Convenience commands ----- | |
| % Choose one option (bubbles) | |
| \newcommand{\chooseone}{{\Large$\Circle$\ \ }} | |
| % Choose all options that apply (boxes) | |
| \newcommand{\choosemany}{{\Large$\Square$\ \ }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sketch = require('sketch') | |
| var document = sketch.getSelectedDocument() | |
| var textLayer = document.selectedLayers.layers[0] | |
| var font = textLayer.sketchObject.font() | |
| var newFont = NSFont.fontWithDescriptor_size(font.fontDescriptor(), 12) | |
| textLayer._object.setFont(newFont) | |
| document.sketchObject.inspectorController().reload() //don't forget to reload the inspector! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| framework("CoreText"); | |
| const document = require("sketch").getSelectedDocument(); | |
| const textLayer = document.selectedLayers.layers[0]; | |
| const font = textLayer.sketchObject.font() | |
| const descriptor = font.fontDescriptor().fontDescriptorByAddingAttributes({ | |
| [NSFontFeatureSettingsAttribute]: [ | |
| { | |
| [NSFontFeatureTypeIdentifierKey]: kLowerCaseType, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function runPanel() { | |
| let threadDictionary = NSThread.mainThread().threadDictionary() | |
| let identifier = "co.yourIdentifier" | |
| // If there is already a panel, prevent the plugin from running again | |
| if (threadDictionary[identifier]) return | |
| threadDictionary.panelOpen = true | |
| setupPanel(threadDictionary, identifier) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Sketch = require('sketch') | |
| framework("CoreText"); | |
| let myTextLayer = Sketch.getSelectedDocument().selectedLayers.layers[0] | |
| let textLayer = myTextLayer.sketchObject | |
| if (textLayer.isEditingText() == 0) { | |
| console.log("select some text") | |
| } else { |
OlderNewer