<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Avadh Dwivedi on Medium]]></title>
        <description><![CDATA[Stories by Avadh Dwivedi on Medium]]></description>
        <link>https://medium.com/@avadhbsd?source=rss-f1da6d90045------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DxbrvPq_vrL4rUQKwKUxjg.jpeg</url>
            <title>Stories by Avadh Dwivedi on Medium</title>
            <link>https://medium.com/@avadhbsd?source=rss-f1da6d90045------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 18:15:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@avadhbsd/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Affordance in user interface design]]></title>
            <link>https://uxdesign.cc/affordance-in-user-interface-design-3b4b0b361143?source=rss-f1da6d90045------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b4b0b361143</guid>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[affordance]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[user-interface]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Avadh Dwivedi]]></dc:creator>
            <pubDate>Fri, 26 May 2017 10:03:01 GMT</pubDate>
            <atom:updated>2017-05-28T20:22:19.774Z</atom:updated>
            <content:encoded><![CDATA[<h4>The properties of an object which allow it’s function.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*QqombpRMnZW5sL78tVAoDg@2x.png" /><figcaption>Affordances of concrete drainage pipes</figcaption></figure><h4>Brief history</h4><p>One of the top cited American psychologist <a href="https://en.wikipedia.org/wiki/James_J._Gibson">James J. Gibson</a> from the Department of Psychology at Princeton University did remarkable work on visual perception and coined the term <strong>affordance.</strong></p><p>In his book “<a href="http://www.amazon.in/Ecological-Approach-Visual-Perception-Psychology/dp/1848725787"><em>The Ecological Approach to Visual Perception</em></a>” he explores the topic in detail, you should totally go ahead and grab your copy of the book in case you like reading books. Or you can keep on reading this gist here in the context of user experience and interface design.</p><h4>What is affordance?</h4><p>Affordance describes all actions that are made physically possible by the properties of an object or an environment. A bottle screw cap affords twisting. A hinged door affords pushing or pulling. A staircase affords ascending or descending.</p><p><a href="https://en.wikipedia.org/wiki/Don_Norman">Don Norman</a> introduced the term <a href="http://www.jnd.org/dn.mss/affordances_and.html">perceived affordance</a><strong> </strong>in his book named <a href="https://www.amazon.com/Psychology-Everyday-Things-Donald-Norman/dp/B000HVS5DG">Psychology of Everyday Things</a> to refer to the actions a user perceives to be possible, distinct from those which are actually possible.</p><p>Here is an <a href="#">underlined text</a>. At first, you might perceive it as a hyperlink but when you actually try to click it; it does not act like one. In this very case, it does not work like a hyperlink. It’s an example of how perceived and actual affordances could be distinct.</p><p>Both actual and perceived affordances must be considered in design.</p><p>Desired actions cannot be carried out if the object does not afford it, and afforded actions might not be carried out if the user does not perceive they are possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HijjT4ImgE4Oa55z3AAIaQ.png" /><figcaption>Which one of the above do you perceive to be clickable?</figcaption></figure><p>A user’s perception and understanding of affordances might vary according to their ability, goals, beliefs, context and past experiences. A bottle screw cap may be a mystery to a person who has not encountered one before. A staircase may afford an able-bodied person to ascend to a higher floor, but a person with poor mobility can not afford the same action.</p><p>Affordances can be deliberately constrained to enable only the correct or desired actions. A bottle screw cap cannot be tightened further when the bottle is sealed. A door with a plate instead of a handle cannot be pulled. A car steering wheel won’t turn any further when the wheels themselves are at the limit of their movement.</p><p>In the physical world, the ridges or dots of a bottle cap provides a high-grip surface, suggesting some friction should be applied. A flat plate on a door suggests the door can be pushed in that place. The steering wheel connected to the top of steering column suggests it will turn around that point.</p><h4>Takeaway</h4><p>While designing user interfaces and experiences, designers can use cues to suggest actions that are possible by an interface element. A stack of cards affords rearranging and shuffling for instance. An underlined text on a webpage suggests it is a hyperlink and can be clicked.</p><p>In software interfaces managing affordances is critical, a user might perceive possible actions based on the properties of interface objects. Giving incorrect visual cues can ruin user experience and lead to frustration.</p><p>Credits: <a href="https://medium.com/u/f8589a18b462">Cyber-Duck</a>, <a href="https://medium.com/u/6abe4b8ebcd8">Wikipedia</a></p><p>Share, recommend and stay tuned for more insights on digital product design. I tweet <a href="https://twitter.com/avadhbsd">@avadhbsd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b4b0b361143" width="1" height="1" alt=""><hr><p><a href="https://uxdesign.cc/affordance-in-user-interface-design-3b4b0b361143">Affordance in user interface design</a> was originally published in <a href="https://uxdesign.cc/">UX Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Arrange icons in phyllotaxis pattern with IconFlower Sketch App plugin]]></title>
            <link>https://medium.com/sketch-app-sources/sketch-app-plugin-iconflower-8fc84eef53d6?source=rss-f1da6d90045------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fc84eef53d6</guid>
            <category><![CDATA[sketch-plugin]]></category>
            <category><![CDATA[sketchapp]]></category>
            <category><![CDATA[sketch]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Avadh Dwivedi]]></dc:creator>
            <pubDate>Fri, 05 May 2017 21:08:06 GMT</pubDate>
            <atom:updated>2017-05-26T10:18:59.633Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*malomUCimn-3mX6AQxTjUw.png" /></figure><p>This weekend I made this little plugin. It arrange tons of icons in formations like the petal arrangement pattern in a sunflower.</p><p>I love sunflowers 🌻</p><p>They call such patterns <strong>phyllotaxis</strong> pattern.</p><p>Phyllotaxis describes spiral like patterns — it occurs repeatedly throughout nature. Arrangement of petals in sunflowers for instance. You can read more about <a href="https://en.wikipedia.org/wiki/Phyllotaxis">Phyllotaxis</a> in case you find it interesting.</p><p>The name of this plugin says <strong>Icon</strong>Flower, but it can be used to arrange text, images, shapes layers or even groups.</p><p>Here is how it works</p><ol><li>Install the plugin. Here is <a href="https://github.com/avadhbsd/IconFlower">link to GitHub Repo</a>. Or you can use <a href="https://sketchpacks.com/IconFlower/install">Sketchpacks</a> or <a href="http://sketchrunner.com/">Runner</a></li><li>Inside sketch create an art-board *(the <em>plugin needs an art-board)</em></li></ol><p>2. Place loads of icons / objects / layers on the art-board. <em>(More layers the better — I am using </em><a href="https://geticonjar.com/"><em>Iconjar</em></a><em> to drag — drop icons in the .gif above)</em></p><p>3. Select all icons / objects / layers you want to arrange.</p><p>4. Run the plugin.</p><p>Done! You get selected stuff arranged in a formation to that of a sunflower petals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vpDK8NQEWP9ancpNyfe0mg.gif" /></figure><p>Some examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BEJkPLNgAWWp7ABMzEsCGQ.png" /><figcaption>use shape layers or layer groups</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6sSRD7Q13i64SBNtzb2JQ.png" /><figcaption>use image layers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y941GmZqfYyY_iyO-1V56w.png" /><figcaption>use text layers</figcaption></figure><p>I learned about the concept of phyllotaxis patterns long back but it hit me when I saw <a href="https://medium.com/u/fecd456da1ea">Daniel Shiffman</a> in one of his <a href="https://www.youtube.com/watch?v=KWoJgHFYWxY">coding challenge</a>.</p><p>Translating it from JS to Cocoascript for <a href="https://medium.com/u/d39f69b23aa2">Sketch</a> was straightforward.</p><p>Code for this plugin is nimble and well commented, please feel free to modify and experiment. I would love to see what you might do with it.</p><p>Here is the GitHub repo</p><p><a href="https://github.com/avadhbsd/IconFlower">avadhbsd/IconFlower</a></p><p>You can also install the plugin using <a href="https://sketchrunner.com/">@sketchrunner</a> or <a href="https://medium.com/u/55524fc0a1a2">Sketchpacks</a> just search for IconFlower.</p><p>That’s it for now.</p><p>Next I am working hard on another plugin that will arrange icons with precise control over opacity, colour and scale for each icon, jamming them all in any shape of your choice, something like this —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vBQf0K6jFUx9Qci-UPE35w.jpeg" /></figure><p>Share, Recommend, Tweet, you never know who might find it useful and save hours of pixel pushing.</p><p>Thanks so much for your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fc84eef53d6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sketch-app-sources/sketch-app-plugin-iconflower-8fc84eef53d6">Arrange icons in phyllotaxis pattern with IconFlower Sketch App plugin</a> was originally published in <a href="https://medium.com/sketch-app-sources">Design + Sketch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sketch App plugin : RandomColors]]></title>
            <link>https://medium.com/sketch-app-sources/making-sketch-app-plugin-randomcolor-20480b0f8dcf?source=rss-f1da6d90045------2</link>
            <guid isPermaLink="false">https://medium.com/p/20480b0f8dcf</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[sketchapp]]></category>
            <category><![CDATA[random-color]]></category>
            <category><![CDATA[sketch-plugin]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Avadh Dwivedi]]></dc:creator>
            <pubDate>Fri, 05 Aug 2016 00:56:33 GMT</pubDate>
            <atom:updated>2016-11-28T19:59:34.741Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TPAPlUVBrKki8zU-RCzFVw.png" /></figure><p>As a designer, at times you need to apply a color palette to a group of objects randomly, consider confetti effect for example.</p><p>While <a href="https://en.wikipedia.org/wiki/Pseudorandomness">true randomness</a> is hard to get. It was easier than I initially thought to build this little plugin for sketch app.</p><h4>The Problem</h4><p>Apply <em>x number</em> of colors to <em>n number</em> of objects, randomly.</p><h4>The Solution</h4><ul><li>Define a list of colors</li><li>Select objects one by one</li><li>Fill each object with a color from the list, randomly</li></ul><p>Although one can do it by hand for desired effect and precision, I decided to do it with a plugin; as a learning exercise on making and publishing a plugin for sketch app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*snjYmA8TIYxC1KHFSQZUfQ.gif" /><figcaption>RandomColors Testing</figcaption></figure><h4>Writing The Code</h4><p>Most of the coding was just copy and paste exercise. I searched and found some plugins <a href="http://sketch.land/">here</a>, <a href="https://medium.com/sketch-app-sources/sketch-plugin-snippets-for-plugin-developers-e9e1d2ab6827#.fltervawj">here</a> and <a href="http://www.sketchapp.com/extensions/plugins/">here</a>, doing similar or related tasks. having a look at the source code and finding needed code blocks was not very difficult.</p><p>To handle the random distribution of colors, a few google searches returned the code needed to select a pseudo random number between a predefined <em>minimum</em> and <em>maximum</em> constraint.</p><p>To makes sure one color does not appear twice in a row, a simple <strong>if..then..else</strong> did the job.</p><h4>Code in a glance</h4><p>The source code is well commented, here is quick run through.</p><p><strong>Define the colors</strong><br>Each variable holds one hex value. One can add or remove variables as and when needed.</p><pre>// Define color palette</pre><pre>var color1 =  &quot;#FC583B&quot;<br>var color2 =  &quot;#FFD100&quot;<br>var color3 =  &quot;#3ADCBE&quot;<br>var color4 =  &quot;#5071FF&quot;<br>var color5 =  &quot;#014EEF&quot;<br>var color6 =  &quot;#FFF200&quot;<br>var color7 =  &quot;#78379D&quot;<br>var color8 =  &quot;#FE4F20&quot;<br>var color9 =  &quot;#40BE65&quot;<br>var color10 =  &quot;#EDC054&quot;<br>var color11 =  &quot;#EDC054&quot;</pre><p>Note: <a href="https://github.com/poyi/Copy-Fill-Color">Copy Fill Color Sketch Plugin</a> is a quick way to copy hex value of a fill color by hitting command +Shift + F</p><p><strong>Selecting a color at random</strong><br>This random number generator function accepts a min and a max value, between these values a random number will be generated.</p><pre>/Select a random number</pre><pre>function getRandomIntInclusive(min, max) {<br>      min = Math.ceil(min);<br>      max = Math.floor(max);<br>      return Math.floor(Math.random() * (max - min)) + min;<br>    }</pre><pre>// Define array of previously set colors, for iterative color selection inside the loop.</pre><pre>var colors = [color1, color2, color3, color4, color5, color6,color7,color8,color9,color10,color11]</pre><p><strong>Loop And Select</strong><br>Next is selecting each object in the current selection one by one and applying a random color to it.</p><pre>// Get the current selection</pre><pre>var selection = context.selection</pre><pre>// Prepare for looping through objects in current selection</pre><pre>var loop = selection.objectEnumerator()</pre><pre>// Loop through object and change its fill color</pre><pre>while (item = loop.nextObject()) {</pre><pre>if (item.class() === MSShapeGroup) {</pre><pre>//Get layer style<br>                  var shapeStyle = item.style();</pre><pre>//Get layer style fills array<br>                  var fills = shapeStyle.fills();</pre><pre>//Set fill style if not created<br>                  if(fills.count() &lt;= 0){<br>                      fills.addNewStylePart();<br>                  }</pre><p><strong>Fill A Random Color</strong><br>Finally a random color is applied to the selected shape, and color value is stored to avoid any colors appearing twice in a row.</p><pre>//Get first fill layer style<br>                  var fill = fills.firstObject();</pre><pre>//Get a random color to fill layer style<br>                  var r = getRandomIntInclusive(1,11)</pre><pre>//Avoid repeat colors<br>                  while (lastColor == r) {<br>                    var r = Math.floor(Math.random() * 11)<br>                  }<br>                  // Fill the color<br>                  [fill setColor:[MSColor colorWithSVGString: colors[r]]];</pre><pre>// Remember last used color<br>                  var lastColor = r<br>             }<br>  }</pre><p>Thats it. Oh yes, currently It only works with shape layers other layer types are ignored as of now.</p><p>Find the plugin down below or Download it with <a href="http://sketchtoolbox.com/">Sketch-Toolbox</a></p><p><a href="https://github.com/avadhbsd/RandomColors">avadhbsd/RandomColors</a></p><p>Ability to make plugins for Sketch is real power in designer’s hands, a few lines of code saves hours of pixel pushing. But at the same time My plugins menu is about to explode, a topic for another brain dump.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20480b0f8dcf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sketch-app-sources/making-sketch-app-plugin-randomcolor-20480b0f8dcf">Sketch App plugin : RandomColors</a> was originally published in <a href="https://medium.com/sketch-app-sources">Design + Sketch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>