Skip to content

Commit 4a00923

Browse files
committed
Add documentation for getFormat
1 parent 8048867 commit 4a00923

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ If you are calling this from code, you may want to use object input. Here are s
9797

9898
## Methods
9999

100+
### getFormat
101+
102+
Returns the format used to create the tinycolor instance
103+
```js
104+
var color = tinycolor("red");
105+
color.getFormat(); // "name"
106+
color = tinycolor({r:255, g:255, b:255});
107+
color.getFormat; // "rgb"
108+
```
109+
100110
### isValid
101111

102112
Return a boolean indicating whether the color was successfully parsed. Note: if the color is not valid then it will act like `black` when being used with other methods.

0 commit comments

Comments
 (0)