Annotation Colors Using Hypothes.is: Problems and Solutions

I frequently see the feature request from Hypothes.is users to have the tool add the ability to choose different colors for highlights.

The first occurrence of the issue is probably documented here: https://github.com/hypothesis/vision/issues/123, by the head of the company.

I suspect it may take a while before such a color feature might be built in, if ever. (Here I’ll note that I don’t work for or speak for the company or any of the other open source developers on the project, but I am one what one would consider a “heavy user”.) If they have the time (I know they’re very busy), perhaps they may chime in with a potential roadmap or other ideas.

Color highlights are a difficult user interface problem

While I’m thinking about it, in an academic context for students, colors may be slightly better indicators of different users’ annotations of a particular text as a means of differentiating one annotator from another more subtly, particularly on texts that are extensively marked up.

Just this difference points out what a mixed bag of functionality colored highlights brings from a usability, design, and user interface perspective. While colored highlights is a seemingly “simple” sounding feature in the analog world where a single document is only annotated by one user, mapping it into a digital shared context is a difficult engineering problem to navigate and solve for. What if your color meanings aren’t the same as those of another?, for example.

While colors can be useful for individuals, do they have the same place in a social annotation product?

I already find it difficult to annotate heavily annotated pages that all use the same color, much less a rainbow of others’ colors. (If this is also you, I’ll note that there’s a handy “eye” icon in the annotation drawer that will allow you to turn them on/off.)

Potential Color Highlight Hacks

While the value of colors may be useful in some contexts, you could potentially use a few other features, functionality, and methods to creatively achieve a similar feature in Hypothes.is for yourself today. Below are a few potential creative “hacks” that some might try.

Use the tagging functionality

You could use the tagging system to create specific tags to stand in for your desired colors: As an example, in some systems I might use the following color designators:

  • Yellow—general highlights and highlights which don’t fit under another category below
  • Orange—Vocabulary word; interesting and/or rare word
  • Green—Reference to read
  • Blue—Interesting Quote
  • Gray—Typography Problem
  • Red—Example to work through

Instead of colors in Hypothesis, for example, one could use the tags “words” or “vocabulary”, “reference” or “citation“, “typo“, “quotes“, or “examples” to stand in for these particular “colors” respectively. I sometimes practice some of these which you can find by clicking on the links, though you may note that in practice I use other tags for them.

In some sense, this is what the software would be doing, particularly with regard to search for these after-the-fact. If you wanted a list of all your “citations” for example, you’d have to search for the color for that and be able to find them all, presuming this search functionality existed with such a color feature. This isn’t really much different than simply tagging all those particular highlights with words like “citation” or “reference” in the first place.

Use the Group Functionality

You could created different “groups” (private or public) to stand in for the colors you wish you had, thus a “yellow group” could be used for one “color” of highlight and a “green group” for another. ( See Annotating with Groups for more details.)

Switching between groups for annotating isn’t going to be drastically different than a user interface for switching colors of highlighter. The one drawback (or perhaps it’s a feature?) here is that you will only be able to see one “color” at a time.

Roll your own solution with open source

As ever, with some work, you could self-host the open source software and modify your copy to add this functionality in for yourself.

Some clever hacks in your browser with CSS might also give you your preferred output. I know some users have done custom work to the Hypothes.is UI in the past: eg. https://tomcritchlow.com/2019/02/12/annotations/, see his gist at the bottom of the post.

Another custom solution which may give you ideas can also be found at https://web.hypothes.is/blog/do-it-yourself-anchoring-and-the-evolution-of-the-hypothesis-toolkit/.

Perhaps adding custom classes on the tags or usernames might allow people the ability to target highlights on a page so that one could define custom CSS rules for each highlight using either usernames of tags as well? Of course, just like the “eye icon” described above, I’m sure there are times that people will appreciate the ability to turn these colors on and off. I personally don’t want the clean interface dressed up in Josephs Amazing Technicolor Annotation Dreamcoat.

Other solutions and problems?

Are there ideas or potential solutions for color highlights I’ve missed? How about design problems that might be encountered in implementing color-coded highlights in the older single document/single user model being transferred to a multi-user space with infinite scale? Is color the best and most accessible solution? Are there better things that could be done with color in the product?

Feel free to comment below with your ideas or links to examples.

Interested in other Hypothes.is hacks, tips, and ideas? Try browsing my Hypothes.is archive.

Forget about blackout poetry, Google enables highlight poetry in your browser!

Kevin Marks literally and figuratively highlighted a bit of interesting found poetry on Google’s Ten things we know to be true article. (Click the link to see the highlight poetry on Google’s page for yourself.)

A screenshot appears below:

Screenshot of a Google Page with the words "Doing evil is a business. take advantage of all our users" disaggregated, but highlighted so as to reveal a message.
Found poetry:
“Doing evil
is a business
take advantage of
all our users”

Here’s a shortened URL for it that you can share with others: bit.ly/D-ntB-Evil

It’s a creative inverse of blackout poetry where instead of blacking out extraneous words, one can just highlight them instead. This comes courtesy of some new browser based functionality that Google announced earlier this week relating to some of their search and page snippets functionality.

You can find some code and descriptions for how to accomplish this in the WISC Scroll to Text Github repository.

What kind of poetry will you find online this week?

Read Google now highlights search results directly on webpages (The Verge)
It doesn’t seem to be available everywhere just yet.

SearchEngineLand notes that this could have an impact on the ad market, since a website’s visitors may be automatically scrolled down past its ads to the relevant content. The publication notes that sites may need to change the location of their ads in light of Google’s latest feature. 

And of course there will be crazy implications for the adtech space.

Annotated on June 04, 2020 at 09:30AM

Clicking the snippet still takes you to the webpage that it pulled the information from, but now the text from the snippet will be highlighted in yellow, and the browser will automatically scroll down to the section in question. 

This is a feature that’s been implemented in most browsers for a while as fragmentions.

Hypothes.is has supported this sort of functionality for a few years now as well.

I’m curious how these different implementations differ?

Annotated on June 04, 2020 at 09:36AM

and started testing the functionality on HTML pages last year 

According to Kevin Marks, this is the GitHub Repo they’ve been using for creating this work: https://github.com/WICG/scroll-to-text-fragment#:~:text=the%20worst&text=a%20Google&text=serious%20breakage&text=behavior
Annotated on June 04, 2020 at 12:08PM

Hypothes.is annotations to WordPress via RSS

I created a video overview/walkthrough of how I take highlights and annotations on Hypothes.isHypothes.is and feed them through to my WordPress Website using RSS and IFTTT.com.

I suspect that a reasonable WordPress user could probably set up a free Hypothes.is account and use the RSS feed from it (something like https://hypothes.is/stream.atom?user=username) to create an IFTTT.com recipe to post it as a public/draft to their WordPress website.

My version presented here has also been augmented by also using the Post Kinds Plugin to which I’ve manually added a custom annotation post type along with some CSS for the yellow highlight effect. These additional coding flourishes aren’t absolutely necessary for those who just want to own the data on their website.

If you want to get even fancier you could also do RSS to IFTTT to do a webhook post to an Micropub endpoint or custom code your own solution using their API. Lots of options are available, the most difficult part may be knowing that something like this could even be done.

Bookmarked Great Expectations (Serapis Classics) (7switch.com)
An ebook published using TiddlyWiki
An interesting example of a book published using TiddlyWiki as an ebook platform. It also enables highlighting and annotations to boot! I’m curious how well it works with Hypothes.is given their anchoring schemes?
Read Managing kindle highlights with Python and GitHub by duarte o.carmo (duarte o.carmo)
tl;dr: use this script to build a GitHub Repo like this one where you store all the highlights from your kindle books in an organized way. Kindle sucks, kindle is great We all love reading in our Kindle. You can travel with more than one book at the time, you can search for words you don’t underst...
Annotated How to Highlight the Internet by Andrew Courter (Medium)
Screenshots are disposable, but highlights are forever.
Highlighting this sentence on the Highly blog (on Medium) ironically using Hypothes.is. I’m syndicating a copy over to my own website because I know that most social services are not long for this world. The only highlights that live forever are the ones you keep on your own website or another location that you own and control.

RIP Highly.
Viva IndieWeb!

Annotated An Outline for Using Hypothesis for Owning your Annotations and Highlights by Chris AldrichChris Aldrich (boffosocko.com)

Create an IFTTT.com recipe to port your Hypothesis RSS feed into WordPress posts. Generally chose an “If RSS, then WordPress” setup and use the following data to build the recipe:

Input feed: https://hypothes.is/stream.atom?user=username (change username to your user name)
Optional title: {{EntryTitle}}
Body: {{EntryContent}} from {{EntryUrl}}
{{EntryPublished}}

Categories: Highlight (use whatever categories you prefer, but be aware they’ll apply to all your future posts from this feed)
Tags: hypothes.is
Post status (optional): I set mine to “Draft” so I have the option to keep it privately or to publish it publicly at a later date.

Posting this solely to compare my Hypothes.is highlights and annotations on my website with Will’s version.

I’m still tinkering with mine and should have a Micropub based version using IFTTT and Webhooks done soon.

Annotation posts >> Highlight posts

Because they’re so similar, I’ve decided to discontinue the custom highlight posts my site had in lieu of the more prevalent annotation post kind. The layout and format of both as highlighted text quoted from another site was almost exactly the same with the primary difference being my additional commentary added to the highlighted text to call it an annotation. Conceptually I considered “highlight + commentary/reply = annotation”. The difference is marginal at best–pun intended.

Since I only had 13 highlight posts versus 121 annotation posts (plus various additional annotations and highlights which I’ve rolled up into the body of some of my read posts) over the last year and a half, I felt it seemed redundant and bothersome to maintain two separate, but nearly identical post kinds. Semantically one may think of a highlight on some text as an annotation anyway, thus the idea of annotation subsumes that of a simple highlight.

As of this evening, I’ve changed all the custom highlight posts to be of the annotation kind. Other than the one word visual difference of the post kind text changing from “highlight” to “annotation” this change won’t affect much except for those who may have been subscribed to the highlight feed. Going forward you may consider subscribing to my annotation feed instead.

I had created highlight posts first, but in the end annotation posts have won the day. And for those that don’t have them, fear not, because honestly annotation posts are really just glorified bookmarks with custom text in the context. (The glorification only entails a highligher icon instead of a bookmark icon and a bit of CSS to color the text yellow.) I do find having them delineated for my personal research purposes useful though.

Ideas for IndieWeb-ifying Hypothes.is

I use Hypothes.is regularly as part of my daily workflow. I’m also very interested in being able to “own” the data I generate with the tool and being able to keep it on my own digital commonplace book (aka website). As part of this, I’d like to be able to receive notifications from people publicly annotating, highlighting, and replying to my content and potentially display those directly on either my website in the comments section or as marginalia.

I’d promised to do a quick outline for the kind gang at Hypothes.is to outline how to make their product could be a bit more open and support some additional web standards to make it more IndieWeb friendly as well as to work toward supporting the Webmention protocol to send notifications of annotations on a page. A few weeks ago at IndieWebCamp New Haven I decided to finally sketch out some of the pieces which should be relatively easy for them to implement into the product. Below are some of the recommendations and some examples of what needs to be done to implement them into their platform to allow it to better interact with other content on the web. This post is in reply to a few prior conversations about Webmention, but primarily pertains to Microformats which will help in creating those. [1] [2] [3] [4]

Overview

To my knowledge Hypothes.is generates a hash for each annotation it has in the system and generates two separate, but related URLs for them. As an example, here are the two URLs for a response Jon Udell made on my website recently:

The first URL is where a stand-alone copy of the annotation lives on the web, separate from the content it is related to. screen capture of the content at URL https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow The second URL resolves to the page on which the annotation was made and both will automatically open up Hypothesis’ side drawer UI to the annotation in question and will–on most browsers–auto-scroll down the page to show the point at which the annotation was made. Essentially this second URL shows the annotation in-situ in conjunction with the Hypothes.is user interface. I’ll note that they can also have some human readable trailing data in the URL that indicates the site on which the annotation was made like so: https://hyp.is/_tLJyA-cEemE-qPndyfQow/boffosocko.com/?p=55708991. However, in practice, one could remove or replace the boffosocko.com and trailing portion with any other URL and the correct page will still resolve.

It is great that they make the first URL available with the relevant data. This in itself is very IndieWeb friendly to have each annotation in the system have its own stand-alone URL. Sadly all the data on this particular page seems to be rendered using JavaScript rather than being raw HTML. (See also js;dr.) This makes the page human readable, but makes it much more difficult for machines to read or parse these pages. I’d recommend three simple things to make Hypothes.is more (Indie)Web friendly:

  1. Render the annotation on the first URL example in full HTML instead of JavaScript;
  2. Add the appropriate microformats classes on those pages;
  3. Add the canonical URL for the page on which the annotation is in reference to either instead of or in addition to the Hypothes.is prefixed URL which already appears on these pages. Webmention functioning properly will require this canonical URL to exist on the page to be able to send notifications and have them be received properly.

These things would make these pages more easily and usefully parseable on the open web. If/when Hypothes.is may support Webmention (aka web notifications) then all of these prerequisite pieces will already be in place. In the erstwhile, even without Hypothes.is running code to support sending Webmentions, users could force manual Webmentions using services like Telegraph, mention-tech.appspot, or even personal endpoints generated on individual posts (see the one below) or on custom endpoint pages like mine on WordPress. Aaron Parecki’s article Sending your First Webmention from Scratch is a useful tutorial for those with little experience with Microformats or Webmention.

Types of Annotations and Microformats Markup

To my knowledge there are three distinct types of annotations that might occur which may need slightly different microformats mark up depending on the type. These are:

  1. Unassigned page notes (or sometimes orphaned page notes): For all intents and purposes are the equivalent of bookmarks (and are used this way by many) though they go by a different name within the service.
  2. Highlights of particular passages: In IndieWeb parlance, these are roughly equivalent to quotations of content.
  3. Highlights and annotations of particular passages: In IndieWeb terms these again are quotes of content which also have what might be considered a reply or comment to that segment of quoted text. Alternately the annotation itself might be considered a note related to what was highlighted, but I suspect from a UI and semantic viewpoint, treating these as replies is probably more apropos in the majority of cases.

Each of these can obviously have one or more potential tags as well. Some of the examples below include the p-category microformats for how these would logically appear. Using the example URL above and several others for the other cases, I’ll provide some example HTML with proper microformats classes to make doing the mark up easier. I’ve created some minimal versions of text and mark up, though Hypothes.is obviously includes much more HTML (and a variety of divs for CSS purposes. While some of the mark up is a bit wonky, particularly with respect to adding the hyp.is and the original posts’ canonical URLs, it could be somewhat better with some additional reworking of the presentation, but I wanted to change as little as possible of their present UI. For the minimal examples, I’ve stripped out the native Hypothes.is classes and only included the semantic microformats. Because microformats are only meant for semantic mark up, the developers should keep in mind it is good practice NOT to use these classes for CSS styling.

Page note with no annotations (bookmarks)

Example from https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow (but without the annotation portion)


<div class="h-entry">
    <a class="p-author h-card" href="https://hypothes.is/users/judell">judell</a>
    Public on <https://hyp.is/_tLJyA-cEemE-qPndyfQow/boffosocko.com/?p=55708991>"Chris Aldrich on the IndieWeb"</a> (<a class="u-bookmark-of" href="https://boffosocko.com/?p=55708991">boffosocko.com</a>)
    <time class="dt-published" datetime="2019-01-11 18:052:00" title="Friday, Jan 11, 2019, 6:52 PM"><a href="https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow" target="_blank" rel="noopener">Jan 11</a></time>
    
<div class="p-category">tag-name1</div>
 
<div class="p-category">tag-name2</div>
 
<div class="p-category">tag-name3</div>
</div>

Page note with an annotation

(aka a reply, but could alternately be marked up as above as a bookmark) Example from https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow


<div class="h-entry">
    <a class="p-author h-card" href="https://hypothes.is/users/judell">judell</a>
    Public on <https://hyp.is/_tLJyA-cEemE-qPndyfQow/boffosocko.com/?p=55708991>"Chris Aldrich on the IndieWeb"</a> (<a class="u-in-reply-to" href="https://boffosocko.com/?p=55708991">boffosocko.com</a>)
    <time class="dt-published" datetime="2019-01-11 18:052:00" title="Friday, Jan 11, 2019, 6:52 PM"><a href="https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow" target="_blank" rel="noopener">Jan 11</a></time>
    
<div class="e-content">
        
<p>This is web thinking in action.</p>
<p>https://blog.jonudell.net/2011/01/24/seven-ways-to-think-like-the-web/</p>
<p>Well done!</p>

    </div>

    
<div class="p-category">tag-name</div>
</div>

Highlights (aka quotes)

Example from https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow


<div class="h-entry">
    <a class="p-author h-card" href="https://hypothes.is/users/judell">judell</a>
    Public on <a href="https://hyp.is/gBZPQucmEeaPBQvYzSRo-Q/www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/">"As We May Think"</a> (<a class="u-quotation-of h-cite" href="https://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/">www.theatlantic.com</a>)
    <time class="dt-published" datetime="2017-04-30 08:40:00" title="Sunday, Apr 30, 2017, 08:40 AM"><a href="https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow" target="_blank" rel="noopener">Apr 30, 2017</a></time>
    
<blockquote>First he runs through an encyclopedia, finds an interesting but sketchy article, leaves it projected. Next, in a history, he finds another pertinent item, and ties the two together.</blockquote>

    
<div class="p-category">IAnnotate2017</div>
</div>

Annotations (replies)

Example from https://hypothes.is/a/9JrX5lf9RraeLKKn9WwmMQ


<div class="h-entry">
    <a class="p-author h-card" href="https://hypothes.is/users/jeremydean">jeremydean</a>
    Public on <a href="https://hyp.is/9JrX5lf9RraeLKKn9WwmMQ/www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/">"As We May Think"</a> (<a class="u-in-reply-to" href="https://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/">www.theatlantic.com</a>)
    <time class="dt-published" datetime="2015-09-02 15:11:00" title="Wednesday, Sep 2, 2015, 03:11 PM"><a href="https://hypothes.is/a/_tLJyA-cEemE-qPndyfQow" target="_blank" rel="noopener">Sep 2, 2015</a></time>
    
<blockquote class="p-in-reply-to h-cite">This has not been a scientist's war; it has been a war in which all have had a part.
<blockquote>
    
   
<div class="e-content">
        
<p>It kind of blows me mind that the end of WWII is the context for these early dreams of the Internet. Is it the hope experienced in patriotic collaboration toward technological innovation? That's what Bush seems to acknowledge explicitly. It's a techno-militaristic union that haunts us to this day (#prism). But I wonder too if it's the precarious of knowledge, or perhaps the destructiveness of knowledge, that also inspires Bush…</p>

    </div>

    
<div class="p-category">tag-name</div>
</div>

I’ll also note that there’s the potential of a reply on Hypothes.is to a prior reply to a canonical URL source. In that case it could be either marked up as a reply to the “parent” on Hypothesis and/or a reply to the canonical source URL, or even both so that webmentions could be sent further upstream. (My experience in this is more limited, not having dealt with it personally in the past.) Once these pieces are implemented, they can be tested against a variety of microformats parsers to ensure they’re outputting the correct (and properly nested) information. I often find that pin13 is a pretty solid modern and up-to-date choice for this.

Additional resources with examples

I’ll also leave the caveat here, that while I’ve got a stronger grasp of Microformats than the average bear, that the above examples may have some subtle quirks that others may catch or which could be improved upon. I find that the Microformats web chat can be a good source for helps from some of the world’s best experts in the area. (Other methods for engaging in chat via IRC, Slack, etc. can be utilized as well.)

If Dan, Jon, or any of the gang has questions about any of this, I’m happy to chat via phone, video conference, or other to help get them going.

🔖 Highly: Highlight to share.

Bookmarked Highly (Highly)
Highlight the web to share the important parts.
Signing up for yet-another-silo. This one has some slick-looking UI and lots of social and sharing integrations. Their shares to Twitter look interesting, but I really wish there were some better ways to share so well to my own website. Sadly, unlike Hypothes.is, it doesn’t have any annotation functionality. I didn’t find my Twitter colleagues like Jon Udell, Nate Angell, or Jeremy Dean on the service through their Twitter integration set up.

After a cursory look, I’m worried what their funding and monetization plans are and where my data will be in just a few years. While it’s certainly pretty, I far prefer the functionality (and community) that Hypothes.is offers, so I’m not moving any time soon. Definitely worth taking a look at for some of its UI features and interactions and future functionality.

👓 Adaptable lizards illustrate key evolutionary process proposed a century ago | Science Daily

Read Adaptable lizards illustrate key evolutionary process proposed a century ago (ScienceDaily)
The 'Baldwin effect' has now been demonstrated at the genetic level in a population of dark-colored lizards adapted to live on a lava flow in the desert.

Highlights, Quotes, Annotations, & Marginalia

One explanation has been that many of an animal’s traits are not fixed, but can change during its lifetime. This “phenotypic plasticity” enables individual animals to alter their appearance or behavior enough to survive in a new environment. Eventually, new adaptations promoting survival arise in the population through genetic changes and natural selection, which acts on the population over generations. This is known as the “Baldwin effect” after the psychologist James Mark Baldwin, who presented the idea in a landmark paper published in 1896.  

September 11, 2018 at 08:57AM

Journal article available at: https://www.cell.com/current-biology/pdfExtended/S0960-9822(18)30899-6